/// <summary> /// Initializes a new instance of <see cref="SqlSagaStore"/>. /// </summary> /// <param name="dialect">The database dialect associated with this <see cref="SqlSagaStore"/>.</param> /// <param name="serializer">The <see cref="ISerializeObjects"/> used to store binary data.</param> /// <param name="typeLocator">The type locator use to retrieve all known <see cref="Saga"/> types.</param> public SqlSagaStore(ISagaStoreDialect dialect, ISerializeObjects serializer, ILocateTypes typeLocator) { Verify.NotNull(typeLocator, nameof(typeLocator)); Verify.NotNull(serializer, nameof(serializer)); Verify.NotNull(dialect, nameof(dialect)); this.dialect = dialect; this.serializer = serializer; this.typeToGuidMap = GetKnownSagas(typeLocator); this.guidToTypeMap = typeToGuidMap.ToDictionary(item => item.Value, item => item.Key); Initialize(); }
/// <summary> /// Initializes a new instance of <see cref="SqlSagaStore"/>. /// </summary> /// <param name="dialect">The database dialect associated with this <see cref="SqlSagaStore"/>.</param> /// <param name="serializer">The <see cref="ISerializeObjects"/> used to store binary data.</param> /// <param name="typeLocator">The type locator use to retrieve all known <see cref="Saga"/> types.</param> public SqlSagaStore(ISagaStoreDialect dialect, ISerializeObjects serializer, ILocateTypes typeLocator) { Verify.NotNull(typeLocator, nameof(typeLocator)); Verify.NotNull(serializer, nameof(serializer)); Verify.NotNull(dialect, nameof(dialect)); this.dialect = dialect; this.serializer = serializer; this.typeToGuidMap = GetKnownSagas(typeLocator); this.guidToTypeMap = typeToGuidMap.ToDictionary(item => item.Value, item => item.Key); Initialize(); }