Class Extension<TTarget, TValue>
Represents a type-safe extension identifier used for getting and setting single extension values in IExtendableMessage<T> instances. This API is experimental and subject to change.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Protobuf
Assembly: Google.Protobuf.dll
Syntax
public sealed class Extension<TTarget, TValue> : Extension where TTarget : IExtendableMessage<TTarget>
Type Parameters
Name | Description |
---|---|
TTarget | The message type this field applies to |
TValue | The field value type of this extension |
Constructors
Extension(Int32, FieldCodec<TValue>)
Creates a new extension identifier with the specified field number and codec
Declaration
public Extension(int fieldNumber, FieldCodec<TValue> codec)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fieldNumber | |
FieldCodec<TValue> | codec |