Class ExternalMetadataProvider
An external resource extracts stream and module metadata from an aggregate or event.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Namespace: IRM.Domain.Persistance
Assembly: IRM.dll
Syntax
public class ExternalMetadataProvider : IMetadataProvider
Constructors
ExternalMetadataProvider(Func<Object, String>, Func<Object, String>)
Initializes a new instance of the ExternalMetadataProvider class.
Declaration
public ExternalMetadataProvider(Func<object, string> moduleExtracter, Func<object, string> streamExtracter)
Parameters
System.Func<Object, String>
moduleExtracter
A System.Func<T, TResult> that recives the aggregate (or event) as input and must return the module name. |
System.Func<Object, String>
streamExtracter
A System.Func<T, TResult> that recives the aggregate (or event) as input and must return the stream name. |
ExternalMetadataProvider(String, String)
Initializes a new instance of the ExternalMetadataProvider class.
Declaration
public ExternalMetadataProvider(string module, string stream)
Parameters
String
module
The module name. |
String
stream
The stream name. |
Methods
GetMetadata(Object)
Gets metadata associated with the aggregate.
Declaration
public IDictionary<string, object> GetMetadata(object subject)
Parameters
Object
subject
The aggregate to extract metadata from. |
Returns
System.Collections.Generic.IDictionary<String, Object>
|