private void SetMiscDefaults() { ConstantID = MiscTools.CreateConstantID(); PreExtApp = Settings.Default.ConDefaultPreExtApp; PostExtApp = Settings.Default.ConDefaultPostExtApp; MacAddress = Settings.Default.ConDefaultMacAddress; UserField = Settings.Default.ConDefaultUserField; }
public virtual ConnectionInfo Copy() { var newConnectionInfo = (ConnectionInfo)MemberwiseClone(); newConnectionInfo.ConstantID = MiscTools.CreateConstantID(); newConnectionInfo.OpenConnections = new ProtocolList(); return(newConnectionInfo); }
private void SetMiscDefaults() { _constantId = MiscTools.CreateConstantID(); _preExtApp = mRemoteNG.Settings.Default.ConDefaultPreExtApp; _postExtApp = mRemoteNG.Settings.Default.ConDefaultPostExtApp; _macAddress = mRemoteNG.Settings.Default.ConDefaultMacAddress; _userField = mRemoteNG.Settings.Default.ConDefaultUserField; }
public virtual ConnectionInfo Clone() { var newConnectionInfo = new ConnectionInfo(); newConnectionInfo.CopyFrom(this); newConnectionInfo.ConstantID = MiscTools.CreateConstantID(); newConnectionInfo.Inheritance = Inheritance.Clone(); return(newConnectionInfo); }
// Deep clone, recursive public override ConnectionInfo Clone() { var newContainer = new ContainerInfo(); newContainer.CopyFrom(this); newContainer.ConstantID = MiscTools.CreateConstantID(); newContainer.OpenConnections = new ProtocolList(); newContainer.Inheritance = Inheritance.Clone(); foreach (var child in Children.ToArray()) { var newChild = child.Clone(); newChild.RemoveParent(); newContainer.AddChild(newChild); } return(newContainer); }