Goedel.Mesh.ConfigRegistry.Set C# (CSharp) Method

Set() public method

Set a key for a BINARY value, creating a new key if necessary.
public Set ( string Key, byte Value ) : bool
Key string The key to set.
Value byte The value to set it to.
return bool
        public bool Set(string Key, byte[] Value) {
            var Slot = Get(Key);
            if (Slot == null) {
                var NewEntry = new ConfigRegistryEntryBINARY(Value);
                Dictionary.Add(Key, NewEntry);
                return true;
                }
            var Entry = Slot as ConfigRegistryEntryBINARY;
            if (Entry == null) throw new Exception("Wrong type!");

            Entry.Value = Value;
            return false;
            }

Same methods

ConfigRegistry::Set ( string Key, string Value ) : bool
ConfigRegistry::Set ( string Key, string Type, string Value ) : bool
ConfigRegistry::Set ( string Key, uint Value ) : bool