Ejemplo n.º 1
0
        private void ReportFeature(object obj, bool faulty, SPFeatureScope scope, Guid featureId, string url, string name)
        {
            OnFoundFeature(featureId, url, name);
            FeatureParent        location = LocationManager.GetLocation(obj);
            List <FeatureParent> locs     = null;

            if (featureLocations.ContainsKey(featureId))
            {
                locs = featureLocations[featureId];
            }
            else
            {
                locs = new List <FeatureParent>();
            }
            locs.Add(location);
            featureLocations[featureId] = locs;
            if (faulty)
            {
                int faults = 0;
                if (faultyFeatures.ContainsKey(featureId))
                {
                    faults = faultyFeatures[featureId];
                }
                ++faults;
                faultyFeatures[featureId] = faults;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Activate any farm level features on farm content service
        /// </summary>
        private void ActivateFeaturesInFarm()
        {
            Location location = LocationManager.GetLocation(SPFarm.Local);

            foreach (Feature feature in _featureset.FarmFeatures)
            {
                PerformAction(location, SPWebService.ContentService.Features, feature);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Activate any site level features on specified site
        /// </summary>
        private void ActivateFeaturesInSiteCollection(SPSite site)
        {
            Location siteLoc = LocationManager.GetLocation(site);

            foreach (Feature feature in _featureset.SiteCollectionFeatures)
            {
                PerformAction(siteLoc, site.Features, feature);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Activate any webapp features on specified web application
        /// </summary>
        private void ActivateFeaturesInWebApp(SPWebApplication webapp)
        {
            Location webappLoc = LocationManager.GetLocation(webapp);

            foreach (Feature feature in _featureset.WebAppFeatures)
            {
                PerformAction(webappLoc, SPWebService.ContentService.Features, feature);
            }
        }
Ejemplo n.º 5
0
        public void ActivateFeaturesInWeb(SPWeb web, Forcefulness forcefulness)
        {
            _forcefulness = forcefulness;
            Location webLoc = LocationManager.GetLocation(web);

            foreach (Feature feature in _featureset.WebFeatures)
            {
                PerformAction(webLoc, web.Features, feature);
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Record that a feature has been deactivated
        /// </summary>
        public void RecordFeatureDeactivation(object locobj, Guid featureId)
        {
            FeatureParent location = LocationManager.GetLocation(locobj);

            RecordFeatureDeactivationAtLocation(location, featureId);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Record that a feature has been activated (at location specified by object)
 /// </summary>
 public void RecordFeatureActivation(object locobj, Guid featureId)
 {
     Location location = LocationManager.GetLocation(locobj);
 }