Esempio n. 1
0
 public ActivatedFeatureSpecial(
     ActivatedFeature activatedFeature,
     FeatureDefinition definition,
     Location location
     )
 {
     ActivatedFeature = activatedFeature;
     Definition       = definition;
     Location         = location;
 }
Esempio n. 2
0
        /// <summary>
        /// adds or removes an activated feature
        /// </summary>
        /// <param name="feature">feature Guid</param>
        /// <param name="add">adds if true, removes if false</param>
        /// <returns>location with changed activatedfeatures list</returns>
        public void ToggleActivatedFeature(ActivatedFeature feature, bool add)
        {
            var exists = activatedFeatures.Contains(feature);

            if (add && !exists)
            {
                activatedFeatures.Add(feature);
            }
            else if (!add && exists)
            {
                activatedFeatures.Remove(feature);
            }
        }