Example #1
0
        public static bool WasFeatureChanged(
            ulong featureMask,
            ulong newFeature,
            ulong originalFeature,
            out bool isEnabled)
        {
            int num1 = FeatureBitHelper.IsFeatureEnabled(featureMask, originalFeature) ? 1 : 0;

            isEnabled = FeatureBitHelper.IsFeatureEnabled(featureMask, newFeature);
            int num2 = isEnabled ? 1 : 0;

            return(num1 != num2);
        }
Example #2
0
 public static ulong ToggleFeature(ulong featureMask, ulong feature)
 {
     return(!FeatureBitHelper.IsFeatureEnabled(featureMask, feature) ? FeatureBitHelper.EnableFeature(featureMask, feature) : FeatureBitHelper.DisableFeature(featureMask, feature));
 }