-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Other changes - Remove unnecessary constraint on generic type parameter
- Loading branch information
Showing
5 changed files
with
75 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
namespace Loom.EventSourcing.Azure | ||
{ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.Azure.Storage.Blob; | ||
|
||
public class BlobSnapshotter<T> : ISnapshotter | ||
{ | ||
private readonly IStateRehydrator<T> _rehydrator; | ||
private readonly CloudBlobContainer _container; | ||
|
||
public BlobSnapshotter( | ||
IStateRehydrator<T> rehydrator, CloudBlobContainer container) | ||
{ | ||
_rehydrator = rehydrator; | ||
_container = container; | ||
} | ||
|
||
public Task TakeSnapshot(Guid streamId) | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
source/Loom.Tests/EventSourcing/Azure/BlobSnapshotter_specs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
namespace Loom.EventSourcing.Azure | ||
{ | ||
using System; | ||
using FluentAssertions; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
[TestClass] | ||
public class BlobSnapshotter_specs | ||
{ | ||
public class State | ||
{ | ||
public State(int value1, string value2, Guid value3) | ||
{ | ||
Value1 = value1; | ||
Value2 = value2; | ||
Value3 = value3; | ||
} | ||
|
||
public int Value1 { get; } | ||
|
||
public string Value2 { get; } | ||
|
||
public Guid Value3 { get; } | ||
} | ||
|
||
[TestMethod] | ||
public void sut_implements_ISnapshotter() | ||
{ | ||
typeof(BlobSnapshotter<State>).Should().Implement<ISnapshotter>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters