Example #1
0
 public override void Derive(ConfigPart derived)
 {
     if (derived is ConfigValue <T> derivedValue)
     {
         derivedValue.backingValue = this;
         Changed -= derivedValue.InvokeChange;
         Changed += derivedValue.InvokeChange;
     }
 }
Example #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);
     }
 }
Example #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);
     }
 }
Example #4
0
 public abstract void Derive(ConfigPart derived);
Example #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
 }