public virtual MoleculeList Clone() { var clone = new MoleculeList(); clone.UpdatePropertiesFrom(this, null); return(clone); }
public override void UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager) { base.UpdatePropertiesFrom(source, cloneManager); var srcTransportBuilder = source as ITransportBuilder; if (srcTransportBuilder == null) { return; } SourceCriteria = srcTransportBuilder.SourceCriteria.Clone(); TargetCriteria = srcTransportBuilder.TargetCriteria.Clone(); TransportType = srcTransportBuilder.TransportType; _moleculeList.UpdatePropertiesFrom(srcTransportBuilder.MoleculeList, cloneManager); }
public override void UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager) { base.UpdatePropertiesFrom(source, cloneManager); var sourceObserverBuilder = source as IObserverBuilder; if (sourceObserverBuilder == null) { return; } Dimension = sourceObserverBuilder.Dimension; ContainerCriteria = sourceObserverBuilder.ContainerCriteria.Clone(); _moleculeList.UpdatePropertiesFrom(sourceObserverBuilder.MoleculeList, cloneManager); }