Class Extension<TTarget, TValue> (3.15.8)

 public sealed class Extension<TTarget, TValue> : Extension where TTarget : IExtendableMessage<TTarget> 

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.

Inheritance

Object > Extension > Extension<TTarget, TValue>

Namespace

Google.Protobuf

Assembly

Google.Protobuf.dll

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>)

 public Extension(int fieldNumber, FieldCodec<TValue> codec) 

Creates a new extension identifier with the specified field number and codec

Parameters
Name
Description
fieldNumber
codec
FieldCodec <TValue>
Create a Mobile Website
View Site in Mobile | Classic
Share by: