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


C# Instance.SetAppPoolMode方法代码示例

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


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

示例1: EnsureFramework4

    private bool EnsureFramework4(Window mainWindow, Instance instance)
    {
      // verify that .NET framework v4 is used
      if (!instance.IsNetFramework4)
      {
        // suggest to install them
        const string yesEnableSitecoreMvc = "Yes, switch to .NET 4.X";
        const string noCancel = "No, cancel";
        var options2 = new[]
        {
          noCancel, yesEnableSitecoreMvc
        };
        var result2 = WindowHelper.AskForSelection(".NET Framework 4.X is not set", null, 
          "You decided to enable Sitecore MVC, but it requiuires using .NET Framework 4.X in Sitecore instance's application pool for correct work. \n\nWould you like to change .NET Framework version?", 
          options2, mainWindow);

        if (result2 == noCancel)
        {
          return false;
        }

        instance.SetAppPoolMode(true);
      }

      return true;
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:26,代码来源:OpenVisualStudioButton.cs

示例2: DoChangeMode

        private void DoChangeMode(Window mainWindow, Instance instance)
        {
            var title = "Change App Pool Mode";
              var header = title;
              var message = "Change {0} instance's Application Pool mode".FormatWith(instance.Name);
              var options = new[]
              {
            this.GetLabel(instance, 2, false),
            this.GetLabel(instance, 2, true),
            this.GetLabel(instance, 4, false),
            this.GetLabel(instance, 4, true)
              };

              var result = WindowHelper.AskForSelection(title, header, message, options, mainWindow);
              if (result == null)
              {
            return;
              }

              if (result.Contains(LabelCurrent))
              {
            return;
              }

              instance.SetAppPoolMode(result.Contains("4.0"), result.Contains(Label32Bit));
        }
开发者ID:Brad-Christie,项目名称:Sitecore-Instance-Manager,代码行数:26,代码来源:ControlAppPoolButton.cs


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