Class FunctionWrapperCommandDispatchContextEnricher
Utility class that wraps a function as a command dispatch context enricher
Inheritance
System.Object
FunctionWrapperCommandDispatchContextEnricher
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AzureFromTheTrenches.Commanding
Assembly: AzureFromTheTrenches.Commanding.dll
Syntax
public class FunctionWrapperCommandDispatchContextEnricher : ICommandDispatchContextEnricher
Constructors
| Improve this Doc View SourceFunctionWrapperCommandDispatchContextEnricher(Func<IReadOnlyDictionary<String, Object>, IReadOnlyDictionary<String, Object>>)
Constructor
Declaration
public FunctionWrapperCommandDispatchContextEnricher(Func<IReadOnlyDictionary<string, object>, IReadOnlyDictionary<string, object>> func)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Func<System.Collections.Generic.IReadOnlyDictionary<System.String, System.Object>, System.Collections.Generic.IReadOnlyDictionary<System.String, System.Object>> | func | The function to wrap |
Methods
| Improve this Doc View SourceGetAdditionalProperties(IReadOnlyDictionary<String, Object>)
Get additional properties to attach to a command dispatch context. Although it's tempting to think this should be supplied a command the context wraps potentially multiple command dispatches.
Declaration
public IReadOnlyDictionary<string, object> GetAdditionalProperties(IReadOnlyDictionary<string, object> existingEnrichmentProperties)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IReadOnlyDictionary<System.String, System.Object> | existingEnrichmentProperties | The existing properties on the context applied by previous enrichers |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyDictionary<System.String, System.Object> | The set of properties this enricher wants to attach |