public void IsOnlyGetValue() { ValueTypeBase @var = new ButtonValueType(); var isOnlyGet = ActionsDomain.Utils.IsOnlyGetValue(var.GetType()); if (isOnlyGet) { throw new Exception(); } @var = new InfoValueType(); isOnlyGet = ActionsDomain.Utils.IsOnlyGetValue(var.GetType()); if (!isOnlyGet) { throw new Exception(); } }
private static ReadOnlyCollection <ValueInfo> LoadValueInfo() { var info = new List <ValueInfo>(); dict = new Dictionary <string, Tuple <InfoValueType, RegistryValueKind> >(); using (RegistryKey key = Registry.LocalMachine.OpenSubKey(BiosRegKey)) { foreach (string name in key.GetValueNames()) { RegistryValueKind kind = key.GetValueKind(name); InfoValueType type = ValueKindToValueType(kind); info.Add(new ValueInfo(name, type)); dict.Add(name, new Tuple <InfoValueType, RegistryValueKind>(type, kind)); } } return(info.AsReadOnly()); }
public ValueInfo(string valueName, InfoValueType valueType) { this.ValueName = valueName; this.ValueType = valueType; }
public ValueInfo(string valueName, InfoValueType valueType) { this.ValueName = valueName; this.ValueType = valueType; }