public UiComponent(UiComponent other) { this.Type = other.Type; this.Id = other.Id; this.Name = other.Name; other.AdditionalProperties.ForEach(kvpair => this.AdditionalProperties.Add(kvpair.Key, kvpair.Value)); }
public UiAction(UiComponent other) : base(other) { const string key = "JobKey"; if (AdditionalProperties.ContainsKey(key)) { JobKey = AdditionalProperties[key]?.ToString(); AdditionalProperties.Remove(key); } }
public UiAction(UiComponent other) : base(other) { if (other is UiAction otherAction) { JobKey = otherAction.JobKey; return; } const string key = nameof(JobKey); if (AdditionalProperties.ContainsKey(key)) { JobKey = AdditionalProperties[key]?.ToString(); AdditionalProperties.Remove(key); } }