-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Corrected an incorrect exception type being raised for connection strings. Corrected a file and class name TableStoragEventStoreModule => TableStorageEventStoreModule. Added .NET Core dependency modules for blob and table storage data stores and event stores.
- Loading branch information
Showing
40 changed files
with
267 additions
and
53 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
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
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
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
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
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
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
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
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
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
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
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
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
67 changes: 67 additions & 0 deletions
67
...e/Cqrs.DependencyInjection.Azure.Storage/Configuration/AzureBlobStoragEventStoreModule.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,67 @@ | ||
#region Copyright | ||
// // ----------------------------------------------------------------------- | ||
// // <copyright company="Chinchilla Software Limited"> | ||
// // Copyright Chinchilla Software Limited. All rights reserved. | ||
// // </copyright> | ||
// // ----------------------------------------------------------------------- | ||
#endregion | ||
|
||
using System; | ||
using Cqrs.Azure.Storage; | ||
using Cqrs.Azure.Storage.Events; | ||
using Cqrs.DependencyInjection.Modules; | ||
using Cqrs.Events; | ||
using Cqrs.Snapshots; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace Cqrs.DependencyInjection.Azure.Storage.Configuration | ||
{ | ||
/// <summary> | ||
/// A <see cref="Module"/> that wires up the prerequisites of <see cref="IEventStore{TAuthenticationToken}"/> with blob storage. | ||
/// </summary> | ||
/// <typeparam name="TAuthenticationToken">The <see cref="Type"/> of the authentication token.</typeparam> | ||
public class AzureBlobStoragEventStoreModule<TAuthenticationToken> : ResolvableModule | ||
{ | ||
#region Overrides of ResolvableModule | ||
|
||
/// <summary> | ||
/// Loads the module into the kernel. | ||
/// </summary> | ||
public override void Load(IServiceCollection services) | ||
{ | ||
RegisterFactories(services); | ||
RegisterEventSerialisationConfiguration(services); | ||
RegisterEventStore(services); | ||
} | ||
|
||
#endregion | ||
|
||
/// <summary> | ||
/// Register the all factories | ||
/// </summary> | ||
public virtual void RegisterFactories(IServiceCollection services) | ||
{ | ||
services.AddSingleton<IBlobStorageStoreConnectionStringFactory, BlobStorageEventStoreConnectionStringFactory>(); | ||
services.AddSingleton<IBlobStorageSnapshotStoreConnectionStringFactory, BlobStorageSnapshotStoreConnectionStringFactory>(); | ||
} | ||
|
||
/// <summary> | ||
/// Register the all event serialisation configurations | ||
/// </summary> | ||
public virtual void RegisterEventSerialisationConfiguration(IServiceCollection services) | ||
{ | ||
services.AddSingleton<IEventBuilder<TAuthenticationToken>, DefaultEventBuilder<TAuthenticationToken>>(); | ||
services.AddSingleton<IEventDeserialiser<TAuthenticationToken>, EventDeserialiser<TAuthenticationToken>>(); | ||
services.AddSingleton<ISnapshotDeserialiser, SnapshotDeserialiser>(); | ||
} | ||
|
||
/// <summary> | ||
/// Register the <see cref="IEventStore{TAuthenticationToken}"/> | ||
/// </summary> | ||
public virtual void RegisterEventStore(IServiceCollection services) | ||
{ | ||
services.AddSingleton<IEventStore<TAuthenticationToken>, BlobStorageEventStore<TAuthenticationToken>>(); | ||
services.AddSingleton<ISnapshotStore, BlobStorageSnapshotStore>(); | ||
} | ||
} | ||
} |
Oops, something went wrong.