Exemplo n.º 1
0
 /// <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 }));
 }
Exemplo n.º 2
0
 /// <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 }));
 }
Exemplo n.º 3
0
 /// <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;
 }
Exemplo n.º 4
0
 /// <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;
 }
Exemplo n.º 5
0
 /// <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;
 }