Interface IExtendableMessage<T>

public interface IExtendableMessage<T> : IMessage<T>, IMessage, IEquatable<T>, IDeepCloneable<T> where T : IExtendableMessage<T>

Generic interface for a Protocol Buffers message containing one or more extensions, where the type parameter is expected to be the same type as the implementation class. This interface is experiemental and is subject to change.

Namespace

Google.Protobuf

Assembly

Google.Protobuf.dll

Type Parameter

NameDescription
T

Methods

ClearExtension<TValue>(Extension<T, TValue>)

void ClearExtension<TValue>(Extension<T, TValue> extension)

Clears the value of the specified extension

Parameter
TypeNameDescription
Extension<T, TValue>extension
Type Parameter
NameDescription
TValue

ClearExtension<TValue>(RepeatedExtension<T, TValue>)

void ClearExtension<TValue>(RepeatedExtension<T, TValue> extension)

Clears the value of the specified repeated extension

Parameter
TypeNameDescription
RepeatedExtension<T, TValue>extension
Type Parameter
NameDescription
TValue

GetExtension<TValue>(Extension<T, TValue>)

TValue GetExtension<TValue>(Extension<T, TValue> extension)

Gets the value of the specified extension

Parameter
TypeNameDescription
Extension<T, TValue>extension
Returns
TypeDescription
TValue
Type Parameter
NameDescription
TValue

GetExtension<TValue>(RepeatedExtension<T, TValue>)

RepeatedField<TValue> GetExtension<TValue>(RepeatedExtension<T, TValue> extension)

Gets the value of the specified repeated extension or null if the extension isn't registered in this set. For a version of this method that never returns null, use GetOrInitializeExtension<TValue>(RepeatedExtension<T, TValue>)

Parameter
TypeNameDescription
RepeatedExtension<T, TValue>extension
Returns
TypeDescription
RepeatedField<TValue>
Type Parameter
NameDescription
TValue

GetOrInitializeExtension<TValue>(RepeatedExtension<T, TValue>)

RepeatedField<TValue> GetOrInitializeExtension<TValue>(RepeatedExtension<T, TValue> extension)

Gets the value of the specified repeated extension, registering it if it hasn't already been registered.

Parameter
TypeNameDescription
RepeatedExtension<T, TValue>extension
Returns
TypeDescription
RepeatedField<TValue>
Type Parameter
NameDescription
TValue

HasExtension<TValue>(Extension<T, TValue>)

bool HasExtension<TValue>(Extension<T, TValue> extension)

Gets whether the value of the specified extension is set

Parameter
TypeNameDescription
Extension<T, TValue>extension
Returns
TypeDescription
Boolean
Type Parameter
NameDescription
TValue

SetExtension<TValue>(Extension<T, TValue>, TValue)

void SetExtension<TValue>(Extension<T, TValue> extension, TValue value)

Sets the value of the specified extension

Parameters
TypeNameDescription
Extension<T, TValue>extension
TValuevalue
Type Parameter
NameDescription
TValue

Extension Methods