public EPermission VerifyFeature(EFeatures descriptionFeature) { if (Features.Exists(f => f.Description == descriptionFeature)) { Features features = (from Features feature in Features where feature.Description.Equals(descriptionFeature) select feature).SingleOrDefault(); return(features.Permission); } else { return(EPermission.Permitido); } }
public static List <Frame> FilterFrames(List <Frame> frames, EFeatures features) { List <Frame> filteredFrames = new List <Frame>(); for (int i = 0; i < frames.Count; ++i) { Console.WriteLine(frames[i].Features); if ((frames[i].Features & features) != 0) { filteredFrames.Add(frames[i]); } } return(filteredFrames); }
public void TurnOffFeatures(EFeatures features) { Features &= ~features; }
public void TurnOnFeatures(EFeatures features) { Features |= features; }
public void ToggleFeatures(EFeatures features) { Features ^= features; }
public bool PermissionFeature(EFeatures efeature, EPermission ePermission, List <Features> features) { return(features.Any(feature => (feature.Permission.Equals(ePermission)) && (StringValue.GetStringValue(efeature).Equals(feature.Description)))); }