internal SmartEnumWhen(bool stopEvaluating, ISmartEnum smartEnum) { this.stopEvaluating = stopEvaluating; this.smartEnum = smartEnum; }
/// <summary> /// When this instance is one of the specified <see cref="SmartEnum{TEnum, TValue}"/> parameters. /// Execute the action in the subsequent call to Then(). /// </summary> /// <param name="smartEnumWhen">A collection of <see cref="SmartEnum{TEnum, TValue}"/> values to compare to this instance.</param> /// <returns>A executor object to execute a supplied action.</returns> public SmartEnumThen <TEnum, TValue> When(ISmartEnum smartEnumWhen) => new SmartEnumThen <TEnum, TValue>(isMatch: smartEnum.Equals(smartEnumWhen), stopEvaluating: stopEvaluating, smartEnum: smartEnum);
internal SmartEnumThen(bool isMatch, bool stopEvaluating, ISmartEnum smartEnum) { this.isMatch = isMatch; this.smartEnum = smartEnum; this.stopEvaluating = stopEvaluating; }