Class PatternConverters
- Namespace
- Cratis.Chronicle.Patterns
- Assembly
- Cratis.Chronicle.dll
Extension methods for converting patterns from their contract representation.
public static class PatternConverters
- Inheritance
-
PatternConverters
- Inherited Members
Methods
ToClient(BehaviorPatternDetailsResponse)
Convert a contract pattern to its client representation.
public static BehaviorPattern ToClient(this BehaviorPatternDetailsResponse pattern)
Parameters
patternBehaviorPatternDetailsResponseThe pattern to convert.
Returns
- BehaviorPattern
The converted BehaviorPattern.
Remarks
The response carries an Id and a Specificity that the client type derives rather than stores -
the identity is the scope and facets it already holds, and specificity is how many facets that is.
ToClient(IEnumerable<BehaviorPatternDetailsResponse>)
Convert a collection of contract patterns to their client representation.
public static IEnumerable<BehaviorPattern> ToClient(this IEnumerable<BehaviorPatternDetailsResponse> patterns)
Parameters
patternsIEnumerable<BehaviorPatternDetailsResponse>The patterns to convert.
Returns
- IEnumerable<BehaviorPattern>
The converted patterns.