Пример #1
0
 public override void Derive(ConfigPart derived)
 {
     if (derived is ConfigValue <T> derivedValue)
     {
         derivedValue.backingValue = this;
         Changed -= derivedValue.InvokeChange;
         Changed += derivedValue.InvokeChange;
     }
 }
Пример #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);
     }
 }
Пример #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);
     }
 }
Пример #4
0
 public abstract void Derive(ConfigPart derived);
Пример #5
0
 public override void Derive(ConfigPart derived)
 {
     // TODO (or rather probably ignore, as deriving is a bit ambiguous)
 }
Пример #6
0
 public override void Derive(ConfigPart derived)
 {
     // TODO
 }