Public Member Functions | List of all members
GridGain.Portable.IPortableBuilder Interface Reference

Portable object builder. Provides ability to build portable objects dynamically without having class definitions. More...

Public Member Functions

T GetField< T > (string fieldName)
 Get object field value. If value is another portable object, then builder for this object will be returned. If value is a container for other objects (array, ICollection, IDictionary), then container will be returned with primitive types in deserialized form and portable objects as builders. Any change in builder or collection returned through this method will be reflected in the resulting portable object after build. More...
 
IPortableBuilder SetField< T > (string fieldName, T val)
 Set object field value. Value can be of any type including other IPortableObject and other builders. More...
 
IPortableBuilder RemoveField (string fieldName)
 Remove object field. More...
 
IPortableBuilder HashCode (int hashCode)
 Set explicit hash code. If builder creating object from scratch, then hash code initially set to 0. If builder is created from exising portable object, then hash code of that object is used as initial value. More...
 
IPortableObject Build ()
 Build the object. More...
 

Detailed Description

Note that type ID is required in order to build portable object. Usually it is enough to provide a simple type name and GridGain will generate the type ID automatically.

Member Function Documentation

IPortableObject GridGain.Portable.IPortableBuilder.Build ( )
Returns
Resulting portable object.
T GridGain.Portable.IPortableBuilder.GetField< T > ( string  fieldName)
Parameters
fieldNameField name.
Returns
Field value.
IPortableBuilder GridGain.Portable.IPortableBuilder.HashCode ( int  hashCode)
Parameters
hashCodeHash code.
Returns
Current builder instance.
IPortableBuilder GridGain.Portable.IPortableBuilder.RemoveField ( string  fieldName)
Parameters
fieldNameField name.
Returns
Current builder instance.
IPortableBuilder GridGain.Portable.IPortableBuilder.SetField< T > ( string  fieldName,
T  val 
)
Parameters
fieldNameField name.
valField value.
Returns
Current builder instance.