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();
            }
        }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
 public ValueInfo(string valueName, InfoValueType valueType)
 {
     this.ValueName = valueName;
     this.ValueType = valueType;
 }
Exemplo n.º 4
0
 public ValueInfo(string valueName, InfoValueType valueType)
 {
     this.ValueName = valueName;
     this.ValueType = valueType;
 }