Class PortableProperty
A PortableProperty marks a member variable or method accessor as a POF serialized attribute. Whilst the Index and ICodec can be explicitly specified they can be determined by classes that use this annotation. Hence these attributes serve as hints to the underlying parser.
Inherited Members
Namespace: Tangosol.IO.Pof.Annotation
Assembly: Coherence.dll
Syntax
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field)]
public class PortableProperty : Attribute
Constructors
PortableProperty()
Constructs a PortableProperty attribute with a default index value of -1.
Declaration
public PortableProperty()
PortableProperty(int)
Construct a PortableProperty attribute with a Codecs.DefaultCodec.
Declaration
public PortableProperty(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The POF index of this portable property. |
PortableProperty(int, Type)
Construct a PortableProperty attribute using the specified index and ICodec Type.
Declaration
public PortableProperty(int index, Type codec)
Parameters
Type | Name | Description |
---|---|---|
int | index | The POF index of this portable property. |
Type | codec | Type of the ICodec used to encode/decode the property. |
PortableProperty(Type)
Construct a PortableProperty attribute with the specified ICodec Type. Defaults the index to -1.
Declaration
public PortableProperty(Type codec)
Parameters
Type | Name | Description |
---|---|---|
Type | codec | Type of the ICodec used to encode/decode the property. |
Properties
Codec
A codec to use to short-circuit determining the type via either method return type or field type.
Declaration
public Type Codec { get; }
Property Value
Type | Description |
---|---|
Type |
Remarks
This could be used to determine concrete implementations of interfaces, i.e. when the method return is a IList<T> this type definition could instruct the code to utilize a LinkedList<T>.
See Also
Index
The index of this property.
Declaration
public int Index { get; }
Property Value
Type | Description |
---|---|
int |