Пример #1
0
 public void DisableGroup(string groupName)
 {
     using (RegistryKey registryKey = this.OpenGroupConfigKey(groupName, true))
     {
         RegUtils.SetProperty <bool>(registryKey, "IsAutomaticActionsAllowed", false);
     }
 }
Пример #2
0
 public void SetDefaultGroupName(string groupName)
 {
     using (RegistryKey registryKey = this.OpenGroupsContainerKey(true))
     {
         RegUtils.SetProperty <string>(registryKey, "DefaultGroupName", groupName);
     }
 }
Пример #3
0
 public void SetRestartRequired(string groupName, bool isRestartRequired)
 {
     lock (this.locker)
     {
         using (RegistryKey registryKey = this.OpenGroupConfigKey(groupName, true))
         {
             RegUtils.SetProperty <bool>(registryKey, "IsRestartRequested", isRestartRequired);
         }
     }
 }
Пример #4
0
 public void SetGroupMemberConfig(string groupName, InstanceGroupMemberConfig cfg)
 {
     lock (this.locker)
     {
         using (RegistryKey registryKey = this.OpenGroupMemberConfigKey(groupName, cfg.Name, true))
         {
             RegUtils.SetProperty <bool>(registryKey, "IsWitness", cfg.IsWitness);
             if (!string.IsNullOrEmpty(cfg.NetworkAddress))
             {
                 RegUtils.SetProperty <string>(registryKey, "NetworkAddress", cfg.NetworkAddress);
             }
         }
     }
 }