コード例 #1
0
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter(new object[]
            {
                this.RoleName
            });
            Version configuredVersion = RolesUtility.GetConfiguredVersion(this.RoleName);

            base.WriteObject(configuredVersion);
            TaskLogger.LogExit();
        }
コード例 #2
0
ファイル: ManageRole.cs プロジェクト: YHZX2013/exchange_diff
        protected override void PopulateContextVariables()
        {
            base.Fields["PreviousVersion"] = RolesUtility.GetConfiguredVersion(this.RoleName);
            base.Fields["TargetVersion"]   = ConfigurationContext.Setup.GetExecutingVersion();
            base.Fields["NetBIOSName"]     = base.GetNetBIOSName((string)base.Fields["FqdnOrName"]);
            this.PopulateRoles(RoleManager.Roles, "AllRoles");
            RoleCollection installedRoles = RoleManager.GetInstalledRoles();

            foreach (Role role in installedRoles)
            {
                base.Fields[string.Format("Is{0}Installed", role.RoleName)] = role.IsInstalled;
            }
            this.PopulateRoles(installedRoles, "Roles");
            base.PopulateContextVariables();
        }
コード例 #3
0
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            Version unpackedVersion = RolesUtility.GetUnpackedVersion("AdminToolsRole");

            if (unpackedVersion != null && unpackedVersion < AdminToolsRole.FirstConfiguredVersion && RolesUtility.GetConfiguredVersion("AdminToolsRole") == null)
            {
                TaskLogger.Log(Strings.UpdatingAdminToolsConfiguredVersion(unpackedVersion.ToString()));
                RolesUtility.SetConfiguredVersion("AdminToolsRole", unpackedVersion);
            }
            TaskLogger.LogExit();
        }