Пример #1
0
 public int WhenElementsAdded_ThenCountIsTotalNumberOfElements <T>(EnumSet <T> set, List <T> elements) where T : struct, Enum
 {
     foreach (var e in elements)
     {
         set.Add(e);
     }
     return(set.Count);
 }
        private static EnumSet GetEnumSetFeatures(Features features)
        {
            EnumSet featuresSet = EnumSet.Of(Feature.ImageTracking);

            if ((features & Features.ImageTracking) != Features.ImageTracking)
            {
                featuresSet.Remove(Feature.ImageTracking);
            }
            if ((features & Features.ObjectTracking) == Features.ObjectTracking)
            {
                featuresSet.Add(Feature.ObjectTracking);
            }
            if ((features & Features.InstantTracking) == Features.InstantTracking)
            {
                featuresSet.Add(Feature.InstantTracking);
            }
            if ((features & Features.Geo) == Features.Geo)
            {
                featuresSet.Add(Feature.Geo);
            }

            return(featuresSet);
        }
Пример #3
0
 public void Add(Qualification qualification)
 {
     set.Add(qualification);
 }