public override object Clone() { var result = new LocalNode((NodeDescriptor)base.Clone()); result.Fingers = this.Fingers; result.InitNode = this.InitNode; result.Predecessor = this.Predecessor; result.SuccessorCache = this.SuccessorCache; return result; }
public override IOverlayNode PrepareForSerialization() { var result = new LocalNode(new NodeDescriptor(this)); result.Fingers = this.Fingers.Select(f => new Finger { Start = f.Start, Node = new NodeDescriptor(f.Node) }).ToList(); if (this.InitNode != null) { result.InitNode = new NodeDescriptor(this.InitNode); } if (this.Predecessor != null) { result.Predecessor = new NodeDescriptor(this.Predecessor); } result.SuccessorCache = this.SuccessorCache.Select(s => new NodeDescriptor(s)).ToArray(); return result; }