Esempio n. 1
0
 public override void Derive(ConfigPart derived)
 {
     if (derived is ConfigValue <T> derivedValue)
     {
         derivedValue.backingValue = this;
         Changed -= derivedValue.InvokeChange;
         Changed += derivedValue.InvokeChange;
     }
 }
Esempio n. 2
0
 public override void Derive(ConfigPart derived)
 {
     foreach (var prop in GetConfigPartProperties())
     {
         var self  = (ConfigPart)prop.GetValue(this) !;
         var other = (ConfigPart)prop.GetValue(derived) !;
         self.Derive(other);
     }
 }
Esempio n. 3
0
 public static ConfigPart[] ByPathAsArray(this ConfigPart config, string path)
 {
     try
     {
         return(config.ByPath(path).ToArray());
     }
     catch (Exception ex)
     {
         throw new CommandException("Invalid TomlPath expression", ex, CommandExceptionReason.CommandError);
     }
 }
Esempio n. 4
0
 public abstract void Derive(ConfigPart derived);
Esempio n. 5
0
 public override void Derive(ConfigPart derived)
 {
     // TODO (or rather probably ignore, as deriving is a bit ambiguous)
 }
 public override void Derive(ConfigPart derived)
 {
     // TODO
 }