Ejemplo n.º 1
0
        public void SetValue(string name, object value, RegistryValueKind valueKind)
        {
            value = System.Management.Automation.PSObject.Base(value);
            value = RegistryWrapperUtils.ConvertUIntToValueForRegistryIfNeeded(value, valueKind);

            _regKey.SetValue(name, value, valueKind);
        }
Ejemplo n.º 2
0
 public void SetValue(string name, object value, RegistryValueKind valueKind)
 {
     using (this.provider.CurrentPSTransaction)
     {
         value = PSObject.Base(value);
         value = RegistryWrapperUtils.ConvertUIntToValueForRegistryIfNeeded(value, valueKind);
         this.txRegKey.SetValue(name, value, valueKind);
     }
 }
Ejemplo n.º 3
0
        public void SetValue(string name, object value, RegistryValueKind valueKind)
        {
            using (_provider.CurrentPSTransaction)
            {
                value = System.Management.Automation.PSObject.Base(value);
                value = RegistryWrapperUtils.ConvertUIntToValueForRegistryIfNeeded(value, valueKind);

                _txRegKey.SetValue(name, value, valueKind);
            }
        }
Ejemplo n.º 4
0
        public object GetValue(string name, object defaultValue, RegistryValueOptions options)
        {
            object obj2 = this.regKey.GetValue(name, defaultValue, options);

            try
            {
                obj2 = RegistryWrapperUtils.ConvertValueToUIntFromRegistryIfNeeded(name, obj2, this.GetValueKind(name));
            }
            catch (IOException)
            {
            }
            return(obj2);
        }
Ejemplo n.º 5
0
 public object GetValue(string name)
 {
     using (this.provider.CurrentPSTransaction)
     {
         object obj2 = this.txRegKey.GetValue(name);
         try
         {
             obj2 = RegistryWrapperUtils.ConvertValueToUIntFromRegistryIfNeeded(name, obj2, this.GetValueKind(name));
         }
         catch (IOException)
         {
         }
         return(obj2);
     }
 }
Ejemplo n.º 6
0
        public object GetValue(string name, object defaultValue, RegistryValueOptions options)
        {
            object value = _regKey.GetValue(name, defaultValue, options);

            try
            {
                value = RegistryWrapperUtils.ConvertValueToUIntFromRegistryIfNeeded(name, value, GetValueKind(name));
            }
            catch (System.IO.IOException)
            {
                // This is expected if the value does not exist.
            }

            return(value);
        }
Ejemplo n.º 7
0
        public object GetValue(string name)
        {
            using (_provider.CurrentPSTransaction)
            {
                object value = _txRegKey.GetValue(name);

                try
                {
                    value = RegistryWrapperUtils.ConvertValueToUIntFromRegistryIfNeeded(name, value, GetValueKind(name));
                }
                catch (System.IO.IOException)
                {
                    // This is expected if the value does not exist.
                }

                return(value);
            }
        }
Ejemplo n.º 8
0
 public void SetValue(string name, object value, RegistryValueKind valueKind)
 {
     value = PSObject.Base(value);
     value = RegistryWrapperUtils.ConvertUIntToValueForRegistryIfNeeded(value, valueKind);
     this.regKey.SetValue(name, value, valueKind);
 }