/// <summary> /// Compare two configurations. /// </summary> /// <param name="other">Other configuration.</param> /// <returns>Equals or not.</returns> protected bool Equals( WavesConfiguration other) { return(Equals( Properties, other.Properties)); }
/// <inheritdoc /> public virtual Task SaveConfigurationAsync() { Configuration = new WavesConfiguration(); var pluginType = GetType(); var properties = pluginType.GetProperties(); foreach (var property in properties) { var attributes = property.GetCustomAttributes(true); foreach (var attribute in attributes) { if (!(attribute is WavesPropertyAttribute)) { continue; } var name = property.Name; var value = property.GetValue(this); Configuration.AddProperty(name, value); } } return(Task.CompletedTask); }
/// <inheritdoc /> public object Clone() { var configuration = new WavesConfiguration(); foreach (var property in Properties) { configuration.Properties.Add((IWavesProperty)property.Clone()); } return(configuration); }