/// <summary> /// Checks if the specified value fulfills the condition. /// </summary> /// <param name="value">Value to check.</param> /// <returns>True if the specified value fulfills the condition; otherwise, false.</returns> public override bool IsFulfilled(object value) { if (!(value is Enum) || !(this.RequiredConditionValue is Enum)) { return(false); } Enum enumValue = (Enum)value; Enum requiredEnumValue = (Enum)this.RequiredConditionValue; #if !WINDOWS_STORE switch (this.Check) { case ConditionalFlagsCheck.AllSet: return(enumValue.IsOptionSet(requiredEnumValue)); case ConditionalFlagsCheck.OneSet: return(enumValue.AnyOptionSet(requiredEnumValue)); default: return(false); } #else throw new NotImplementedException("Not implemented for Windows Store build targets."); #endif }