public override void FeatureUninstalling(SPFeatureReceiverProperties properties) { using (var ca = SPWebManager.GetCentralAdminWeb()) { Setup.Uninstall(ca); } }
/// <summary> /// Initializes a new instance of the <see cref="BrandingService"/> class. /// </summary> /// <param name="ctx">The CTX.</param> /// <param name="target">The target.</param> /// <param name="defines">The defines.</param> /// <param name="log">The log.</param> /// <param name="branding">The branding.</param> public BrandingService(ClientContext ctx, string target, string[] defines, ILogger log, IBranding branding) { _ctx = ctx; _target = target; _defines = defines; _branding = branding; _log = log; _webManager = new SPWebManager(_ctx, log); _web = _webManager.LoadWebAsync().ConfigureAwait(false).GetAwaiter().GetResult(); _fileShaman = new FileShaman(_web, log); _pageShaman = new PageShaman(_web, log); _jsInjector = new JsInjector(_web, log); }
public static string GetSpongeUrl() { using (var ca = SPWebManager.GetCentralAdminWeb()) return(ca.Url + "/" + Constants.SpongeWebUrl); }
public static SPWeb GetSpongeWeb() { using (var ca = SPWebManager.GetCentralAdminWeb()) return(ca.Webs[Constants.SpongeWebUrl]); }