CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.Serialization.Mobile.SerializationInfo Class Reference

Object containing the serialization data for a specific object. More...

Inheritance diagram for Csla.Serialization.Mobile.SerializationInfo:
Csla.Serialization.Mobile.IMobileObject

Classes

class  FieldData
 Object that contains information about a single field. More...
class  ChildData
 Object that contains information about a single child reference. More...

Public Member Functions

 SerializationInfo (int referenceId, string typeName)
 Initializes a new instance of SerializationInfo-object.
void AddValue (string name, object? value)
 Adds a value to the serialization stream.
void AddValue (string name, object? value, bool isDirty)
 Adds a value to the list of fields.
void AddValue (string name, object? value, bool isDirty, string? enumTypeName)
 Adds a value to the list of fields.
T? GetValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T > (string name)
 Gets a value from the list of fields.
GetRequiredValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T > (string name)
 Gets a value from the list of fields which is required to be not null.
void AddChild (string name, int referenceId)
 Adds a child to the list of child references.
void AddChild (string name, int referenceId, bool isDirty)
 Adds a child to the list of child references.
 SerializationInfo ()
 Creates an instance of the type.
void GetState (SerializationInfo info)
 Method called by MobileFormatter when an object should serialize its data. The data should be serialized into the SerializationInfo parameter.
void GetChildren (SerializationInfo info, MobileFormatter formatter)
 Method called by MobileFormatter when an object should serialize its child references. The data should be serialized into the SerializationInfo parameter.
void SetState (SerializationInfo info)
 Method called by MobileFormatter when an object should be deserialized. The data should be deserialized from the SerializationInfo parameter.
void SetChildren (SerializationInfo info, MobileFormatter formatter)
 Method called by MobileFormatter when an object should deserialize its child references. The data should be deserialized from the SerializationInfo parameter.

Static Public Member Functions

static bool IsNativeType (Type type)
 Returns true if the type is considered a simple (non-complex) serializable type by MobileFormatter.

Properties

Dictionary< string, ChildDataChildren [get, set]
 Dictionary containing child reference data.
Dictionary< string, FieldDataValues [get, set]
 Dictionary containg field data.
int ReferenceId [get, set]
 Reference number for this object.
string TypeName [get]
 Assembly-qualified type name of the object being serialized.

Detailed Description

Object containing the serialization data for a specific object.

Constructor & Destructor Documentation

◆ SerializationInfo() [1/2]

Csla.Serialization.Mobile.SerializationInfo.SerializationInfo ( int referenceId,
string typeName )
inline

Initializes a new instance of SerializationInfo-object.

Parameters
referenceIdThe reference number for this object.
typeNameAssembly-qualified type name of the object being serialized.
Exceptions
ArgumentExceptiontypeName is null, string.Empty or only consists of white spaces.

◆ SerializationInfo() [2/2]

Csla.Serialization.Mobile.SerializationInfo.SerializationInfo ( )
inline

Creates an instance of the type.

Member Function Documentation

◆ AddChild() [1/2]

void Csla.Serialization.Mobile.SerializationInfo.AddChild ( string name,
int referenceId )
inline

Adds a child to the list of child references.

Parameters
nameName of the field.
referenceIdReference id for the child object.

◆ AddChild() [2/2]

void Csla.Serialization.Mobile.SerializationInfo.AddChild ( string name,
int referenceId,
bool isDirty )
inline

Adds a child to the list of child references.

Parameters
nameName of the field.
referenceIdReference id for the child object.
isDirtyFlag indicating whether the child is dirty.

◆ AddValue() [1/3]

void Csla.Serialization.Mobile.SerializationInfo.AddValue ( string name,
object? value )
inline

Adds a value to the serialization stream.

Parameters
nameName of the field.
valueValue of the field.

◆ AddValue() [2/3]

void Csla.Serialization.Mobile.SerializationInfo.AddValue ( string name,
object? value,
bool isDirty )
inline

Adds a value to the list of fields.

Parameters
nameName of the field.
valueValue of the field.
isDirtyFlag indicating whether the value is dirty.

◆ AddValue() [3/3]

void Csla.Serialization.Mobile.SerializationInfo.AddValue ( string name,
object? value,
bool isDirty,
string? enumTypeName )
inline

Adds a value to the list of fields.

Parameters
nameName of the field.
valueValue of the field.
isDirtyFlag indicating whether the value is dirty.
enumTypeNameName of the enumeration

◆ GetChildren()

void Csla.Serialization.Mobile.SerializationInfo.GetChildren ( SerializationInfo info,
MobileFormatter formatter )
inline

Method called by MobileFormatter when an object should serialize its child references. The data should be serialized into the SerializationInfo parameter.

Parameters
infoObject to contain the serialized data.
formatterReference to the formatter performing the serialization.

Implements Csla.Serialization.Mobile.IMobileObject.

◆ GetRequiredValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T >()

T Csla.Serialization.Mobile.SerializationInfo.GetRequiredValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T > ( string name)
inline

Gets a value from the list of fields which is required to be not null.

Template Parameters
TType to which the value should be coerced.
Parameters
nameName of the field.
Returns
The value.
Exceptions
InvalidOperationExceptionSomething went wrong or the returned value of name would be null.

◆ GetState()

void Csla.Serialization.Mobile.SerializationInfo.GetState ( SerializationInfo info)
inline

Method called by MobileFormatter when an object should serialize its data. The data should be serialized into the SerializationInfo parameter.

Parameters
infoObject to contain the serialized data.

Implements Csla.Serialization.Mobile.IMobileObject.

◆ GetValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T >()

T? Csla.Serialization.Mobile.SerializationInfo.GetValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T > ( string name)
inline

Gets a value from the list of fields.

Template Parameters
TType to which the value should be coerced.
Parameters
nameName of the field.

◆ IsNativeType()

bool Csla.Serialization.Mobile.SerializationInfo.IsNativeType ( Type type)
inlinestatic

Returns true if the type is considered a simple (non-complex) serializable type by MobileFormatter.

Parameters
typeType to evaluate
Returns

◆ SetChildren()

void Csla.Serialization.Mobile.SerializationInfo.SetChildren ( SerializationInfo info,
MobileFormatter formatter )
inline

Method called by MobileFormatter when an object should deserialize its child references. The data should be deserialized from the SerializationInfo parameter.

Parameters
infoObject containing the serialized data.
formatterReference to the formatter performing the deserialization.

Implements Csla.Serialization.Mobile.IMobileObject.

◆ SetState()

void Csla.Serialization.Mobile.SerializationInfo.SetState ( SerializationInfo info)
inline

Method called by MobileFormatter when an object should be deserialized. The data should be deserialized from the SerializationInfo parameter.

Parameters
infoObject containing the serialized data.

Implements Csla.Serialization.Mobile.IMobileObject.

Property Documentation

◆ Children

Dictionary<string, ChildData> Csla.Serialization.Mobile.SerializationInfo.Children
getset

Dictionary containing child reference data.

◆ ReferenceId

int Csla.Serialization.Mobile.SerializationInfo.ReferenceId
getset

Reference number for this object.

◆ TypeName

string Csla.Serialization.Mobile.SerializationInfo.TypeName
get

Assembly-qualified type name of the object being serialized.

◆ Values

Dictionary<string, FieldData> Csla.Serialization.Mobile.SerializationInfo.Values
getset

Dictionary containg field data.


The documentation for this class was generated from the following file: