Show / Hide Table of Contents

Class Codec

Metadata for IPFS multi-codec.

Inheritance
Object
Codec
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: Ipfs.Registry
Assembly: Ipfs.Core.dll
Syntax
public class Codec
Remarks

IPFS assigns a unique Name and Code to codecs. See table.csv for the currently defined multi-codecs.

Properties

| Improve this Doc View Source

All

A sequence consisting of all codecs.

Declaration
public static IEnumerable<Codec> All { get; }
Property Value
Type Description
IEnumerable<Codec>

All the registered codecs.

| Improve this Doc View Source

Code

The IPFS code assigned to the codec.

Declaration
public int Code { get; }
Property Value
Type Description
Int32

Valid codes at https://github.com/multiformats/multicodec/blob/master/table.csv.

| Improve this Doc View Source

Name

The name of the codec.

Declaration
public string Name { get; }
Property Value
Type Description
String

A unique name.

Methods

| Improve this Doc View Source

Deregister(Codec)

Remove an IPFS codec from the registry.

Declaration
public static void Deregister(Codec codec)
Parameters
Type Name Description
Codec codec

The Codec to remove.

| Improve this Doc View Source

Register(String, Int32)

Register a new IPFS codec.

Declaration
public static Codec Register(string name, int code)
Parameters
Type Name Description
String name

The name of the codec.

Int32 code

The IPFS code assigned to the codec.

Returns
Type Description
Codec

A new Codec.

Exceptions
Type Condition
ArgumentException

When the name or code is already defined.

ArgumentNullException

When the name is null or empty.

| Improve this Doc View Source

ToString()

The Name of the codec.

Declaration
public override string ToString()
Returns
Type Description
String

The Name of the codec.

Overrides
Object.ToString()

See Also

https://github.com/multiformats/multicodec
  • Improve this Doc
  • View Source
Back to top Generated by DocFX