/// <summary> /// Removes a link. /// </summary> /// <param name="link"> /// The <see cref="IMerkleLink" /> to remove. /// </param> /// <returns> /// A new <see cref="DagNode" /> with the <paramref name="link" /> /// removed. /// </returns> /// <remarks> /// A <b>DagNode</b> is immutable. /// <para> /// No exception is raised if the <paramref name="link" /> does /// not exist. /// </para> /// </remarks> public DagNode RemoveLink(IMerkleLink link) { return(RemoveLinks(new[] { link })); }
/// <summary> /// Adds a link. /// </summary> /// <param name="link"> /// The link to add. /// </param> /// <returns> /// A new <see cref="DagNode" /> with the existing and new /// links. /// </returns> /// <remarks> /// A <b>DagNode</b> is immutable. /// </remarks> public IDagNode AddLink(IMerkleLink link) { return(AddLinks(new[] { link })); }
/// <summary> /// Creates a new instance of the <see cref="DagLink"/> class from the /// specified <see cref="IMerkleLink"/>. /// </summary> /// <param name="link"> /// Some type of a Merkle link. /// </param> public DagLink(IMerkleLink link) { this.Name = link.Name; this.Id = link.Id; this.Size = link.Size; }
/// <summary> /// Creates a new instance of the <see cref="DagLink"/> class from the /// specified <see cref="IMerkleLink"/>. /// </summary> /// <param name="link">( /// Some type of a Merkle link. /// </param> public DagLink(IMerkleLink link) { this.Name = link.Name; this.Hash = link.Hash; this.Size = link.Size; }
/// <summary> /// Creates a new instance of the <see cref="DagLink"/> class from the /// specified <see cref="IMerkleLink"/>. /// </summary> /// <param name="link"> /// Some type of a Merkle link. /// </param> public DagLink(IMerkleLink link) { Name = link.Name; Id = link.Id; Size = link.Size; }