Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of of <see cref="IClassAspectSwitchOperation"/>.
 /// </summary>
 /// <param name="sequenceGenerator">Sequence generator used to generate sequence number.</param>
 /// <param name="aspectOperations">Operation records of aspects.</param>
 /// <returns>The initialized <see cref="IClassAspectSwitchOperation"/>.</returns>
 public static IClassAspectSwitchOperation InitializeClassAspectSwitchOperation(
     SequenceGenerator sequenceGenerator,
     IReadOnlyDictionary <string, SwitchOperationStatus> aspectOperations)
 {
     return(new ClassAspectSwitchOperation(sequenceGenerator, aspectOperations));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of of <see cref="SwitchOperationStatus"/>.
 /// </summary>
 /// <param name="sequenceGenerator">Sequence generator used to generate sequence number.</param>
 /// <param name="operation">Switch operation.</param>
 /// <returns>The initialized <see cref="SwitchOperationStatus"/></returns>
 public static SwitchOperationStatus InitializeSwitchOperationStatus(SequenceGenerator sequenceGenerator, SwitchOperation operation)
 {
     return(new SwitchOperationStatus(sequenceGenerator, operation));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SwitchOperationStatus"/> class.
 /// </summary>
 /// <param name="sequenceGenerator">Sequence number generator used to generate operation sequence number in case it is not provided.</param>
 /// <param name="operation">Operation</param>
 public SwitchOperationStatus(SequenceGenerator sequenceGenerator, SwitchOperation operation)
 {
     this.sequenceGenerator = sequenceGenerator ?? throw new ArgumentNullException("sequenceGenerator");
     Status = SwitchStatus.Default;
     Switch(operation);
 }