예제 #1
0
        /// <inheritdoc/>
        public void Switch(SwitchOperation operation)
        {
            int sequence;

            if (Operation == null)
            {
                Operation = SwitchFactory.InitializeSwitchOperationStatus(sequenceGenerator, operation);
                sequence  = Operation.Sequence;
            }
            else
            {
                sequence = SwitchExistingClass(operation);
            }

            SwitchAll(operation, sequence);
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of of <see cref="SwitchOperationStatus"/>. Switch operation status will be calculated based on Default status and operation.
 /// </summary>
 /// <param name="sequenceGenerator">Sequence generator used to generate sequence number.</param>
 /// <param name="operation">Switch operation status.</param>
 /// <returns>The initialized <see cref="SwitchOperationStatus"/></returns>
 public static SwitchOperationStatus InitializeSwitchOperationStatus(SequenceGenerator sequenceGenerator, SwitchOperationStatus operation)
 {
     return(new SwitchOperationStatus(sequenceGenerator, operation));
 }