public object GetValue(string name, RegistryValueOptions options) { if (IsMarkedForDeletion) { return(null); } if (name == null) { name = string.Empty; } object value; lock (values) value = values [name]; ExpandString exp = value as ExpandString; if (exp == null) { return(value); } if ((options & RegistryValueOptions.DoNotExpandEnvironmentNames) == 0) { return(exp.Expand()); } return(exp.ToString()); }
public object GetValue(string name, RegistryValueOptions options) { if (this.IsMarkedForDeletion) { return(null); } if (name == null) { name = string.Empty; } object obj = this.values[name]; ExpandString expandString = obj as ExpandString; if (expandString == null) { return(obj); } if ((options & RegistryValueOptions.DoNotExpandEnvironmentNames) == RegistryValueOptions.None) { return(expandString.Expand()); } return(expandString.ToString()); }