Exemple #1
0
        private void ReportFeature(object obj, bool faulty, SPFeatureScope scope, Guid featureId, string url, string name)
        {
            OnFoundFeature(featureId, url, name);
            Location        location = LocationManager.CreateLocation(obj);
            List <Location> locs     = null;

            if (featureLocations.ContainsKey(featureId))
            {
                locs = featureLocations[featureId];
            }
            else
            {
                locs = new List <Location>();
            }
            locs.Add(location);
            featureLocations[featureId] = locs;
            if (faulty)
            {
                int faults = 0;
                if (faultyFeatures.ContainsKey(featureId))
                {
                    faults = faultyFeatures[featureId];
                }
                ++faults;
                faultyFeatures[featureId] = faults;
            }
        }
Exemple #2
0
        /// <summary>
        /// Record that a feature has been deactivated
        /// </summary>
        public void RecordFeatureDeactivation(object locobj, Guid featureId)
        {
            Location location = LocationManager.CreateLocation(locobj);
            Feature  feature  = GetOrAddFeatureFromDefinitions(featureId, location.Scope);

            RemoveFromFeatureLocations(feature, location);
            RemoveFromLocationFeatures(location, feature);
        }