Example #1
0
 // Token: 0x06000448 RID: 1096 RVA: 0x00016C60 File Offset: 0x00014E60
 protected override bool SetDebugOptionInternal <T>(string serverName, string propertyName, T propertyValue)
 {
     try
     {
         if (serverName == null)
         {
             this.m_dbgOptionHandle.SetValue(propertyName, propertyValue, false, null);
         }
         else
         {
             using (IDistributedStoreKey distributedStoreKey = this.m_dbgOptionHandle.OpenKey(serverName, DxStoreKeyAccessMode.CreateIfNotExist, false, null))
             {
                 distributedStoreKey.SetValue(propertyName, propertyValue, false, null);
             }
         }
         return(true);
     }
     catch (ClusterException ex)
     {
         AmTrace.Debug("Ignoring cluster exception while trying to set debug option (serverName={0}, propertyName={1}, propertyValue={2}, exception={3})", new object[]
         {
             serverName,
             propertyName,
             propertyValue.ToString(),
             ex
         });
     }
     return(false);
 }
Example #2
0
 public void SetValue <T>(string keyName, string propertyName, T propetyValue)
 {
     using (IDistributedStoreKey distributedStoreKey = this.OpenRegKey(keyName, true, false))
     {
         distributedStoreKey.SetValue(propertyName, propetyValue, false, null);
     }
 }
Example #3
0
 internal void SetDxStorePrivateProperty <T>(string propertyName, T propertyValue)
 {
     using (IDistributedStoreKey baseKey = DistributedStore.Instance.DxStoreKeyFactoryInstance.GetBaseKey(DxStoreKeyAccessMode.Write, null, null, true))
     {
         baseKey.SetValue(propertyName, propertyValue, false, null);
     }
 }
Example #4
0
        public static bool SetValue <T>(this IDistributedStoreKey key, string propertyName, T propertyValue, bool isBestEffort = false, ReadWriteConstraints constraints = null)
        {
            RegistryValueKind valueKind = Utils.GetValueKind(propertyValue);

            return(key.SetValue(propertyName, propertyValue, valueKind, isBestEffort, constraints));
        }