Class DagLink
A link to another node in the IPFS Merkle DAG.
Implements
Inherited Members
Namespace: Ipfs
Assembly: Ipfs.Core.dll
Syntax
public class DagLink : IMerkleLink
Constructors
| Improve this Doc View SourceDagLink(CodedInputStream)
Creates a new instance of the DagLink class from the specified Google.Protobuf.CodedInputStream.
Declaration
public DagLink(CodedInputStream stream)
Parameters
Type | Name | Description |
---|---|---|
Google.Protobuf.CodedInputStream | stream | ( A Google.Protobuf.CodedInputStream containing the binary representation of the DagLink. |
DagLink(IMerkleLink)
Creates a new instance of the DagLink class from the specified IMerkleLink.
Declaration
public DagLink(IMerkleLink link)
Parameters
Type | Name | Description |
---|---|---|
IMerkleLink | link | Some type of a Merkle link. |
DagLink(Stream)
Declaration
public DagLink(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | A Stream containing the binary representation of the DagLink. |
DagLink(String, Cid, Int64)
Create a new instance of DagLink class.
Declaration
public DagLink(string name, Cid id, long size)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name associated with the linked node. |
Cid | id | The Cid of the linked node. |
Int64 | size | The serialised size (in bytes) of the linked node. |
Properties
| Improve this Doc View SourceId
The unique ID of the link.
Declaration
public Cid Id { get; }
Property Value
Type | Description |
---|---|
Cid | A Cid of the content. |
Name
A name associated with the linked node.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String | A String or null. |
Remarks
warning
IPFS considers a null name different from a Empty name;
Size
The serialised size (in bytes) of the linked node.
Declaration
public long Size { get; }
Property Value
Type | Description |
---|---|
Int64 | Number of bytes. |
Methods
| Improve this Doc View SourceToArray()
Returns the IPFS binary representation as a byte array.
Declaration
public byte[] ToArray()
Returns
Type | Description |
---|---|
Byte[] | A byte array. |
Write(CodedOutputStream)
Writes the binary representation of the link to the specified Google.Protobuf.CodedOutputStream.
Declaration
public void Write(CodedOutputStream stream)
Parameters
Type | Name | Description |
---|---|---|
Google.Protobuf.CodedOutputStream | stream | The Google.Protobuf.CodedOutputStream to write to. |
Write(Stream)
Writes the binary representation of the link to the specified Stream.
Declaration
public void Write(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The Stream to write to. |