Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public void TurnOffFeatures(EFeatures features)
 {
     Features &= ~features;
 }
Esempio n. 4
0
 public void TurnOnFeatures(EFeatures features)
 {
     Features |= features;
 }
Esempio n. 5
0
 public void ToggleFeatures(EFeatures features)
 {
     Features ^= features;
 }
Esempio n. 6
0
 public bool PermissionFeature(EFeatures efeature, EPermission ePermission, List <Features> features)
 {
     return(features.Any(feature => (feature.Permission.Equals(ePermission)) && (StringValue.GetStringValue(efeature).Equals(feature.Description))));
 }