当前位置: 首页>>代码示例>>C#>>正文


C# SPWebApplication.GetChild方法代码示例

本文整理汇总了C#中SPWebApplication.GetChild方法的典型用法代码示例。如果您正苦于以下问题:C# SPWebApplication.GetChild方法的具体用法?C# SPWebApplication.GetChild怎么用?C# SPWebApplication.GetChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SPWebApplication的用法示例。


在下文中一共展示了SPWebApplication.GetChild方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RemoveCleanupTimerJob

        private static void RemoveCleanupTimerJob(SPWebApplication webApplication)
        {
            foreach (var job in webApplication.JobDefinitions)
            {
                if (job.Name == CleanupLogListTimerJob.JobName)
                {
                    job.Delete();
                    break;
                }
            }

            var settings = webApplication.GetChild<CleanupLogListTimerJobSettings>(CleanupLogListTimerJobSettings.SettingsName);
            if (settings != null) settings.Delete();
            ULSLog.LogMessage("Sucessfully removed settings and timer job from Web Application.");
        }
开发者ID:egil,项目名称:SPADD,代码行数:15,代码来源:FileChangedMonitorFeature.EventReceiver.cs

示例2: Load

        /// <summary>
        /// Loads the setting store for the farm provided, and creates the setting store if not found.
        /// </summary>
        /// <param name="webApp">The farm to use</param>
        /// <returns>The setting store for farm level settings</returns>
        public static WebAppSettingStore Load(SPWebApplication webApp)
        {
            var settingStore = webApp.GetChild<WebAppSettingStore>(WebAppSettingStore.StoreName);

            return settingStore;
        }
开发者ID:lazda,项目名称:collabode,代码行数:11,代码来源:WebAppSettingStore.cs

示例3: Create

 /// <summary>
 /// Creates the setting store for a web application
 /// </summary>
 /// <param name="webApp">The parent web app to store the settings</param>
 /// <returns>The web app setting store instance</returns>
 public static WebAppSettingStore Create(SPWebApplication webApp)
 {
     lock (createlock)
     {
         //load to make sure it wasn't already created in a race...
         var settingStore = webApp.GetChild<WebAppSettingStore>(WebAppSettingStore.StoreName);
         if (settingStore == null)
         {
             settingStore = new WebAppSettingStore(WebAppSettingStore.StoreName, webApp);
             settingStore.Update();
         }
         return settingStore;
     }
 }
开发者ID:lazda,项目名称:collabode,代码行数:19,代码来源:WebAppSettingStore.cs

示例4: DeleteStore

        /// <summary>
        /// Removes the setting store.  Warning, all settings will be lost when removed.
        /// </summary>
        /// <param name="webApp">The web app to clear the settings for</param>
        public static void DeleteStore(SPWebApplication webApp)
        {
            var settingStore = webApp.GetChild<WebAppSettingStore>(WebAppSettingStore.StoreName);

            if (settingStore != null)  
            {
                settingStore.Delete();
            }
        }
开发者ID:lazda,项目名称:collabode,代码行数:13,代码来源:WebAppSettingStore.cs


注:本文中的SPWebApplication.GetChild方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。