private ComponentBase(ComponentBase component) { this.Id = component.Id.Clone() as string; this.MonitoringEnable = component.MonitoringEnable; this.Name = component.Name.Clone() as string; this.Parameters = component.Parameters.Select(t =>(MonitoringParameter) t.Clone()).ToList() as List<MonitoringParameter>; this.PositionInfo = component.PositionInfo as string; this.Type = component.Type; }
public object Clone() { var component = new ComponentBase(this); return component; }