9using System.ComponentModel;
10using System.Collections.Generic;
13using System.Diagnostics;
25 [System.Diagnostics.DebuggerStepThrough]
43 [DebuggerBrowsable(DebuggerBrowsableState.Never)]
48 if (_loadListModeObject ==
null)
50 return _loadListModeObject;
55 _loadListModeObject =
null;
56 SetLoadListMode(enabled);
73 [EditorBrowsable(EditorBrowsableState.Never)]
74#pragma warning disable CA1063
76#pragma warning restore CA1063
92#pragma warning disable CA1063
94#pragma warning restore CA1063
96 _target.SetLoadListMode(
false);
97 GC.SuppressFinalize(
this);
103 #region IMobileObject Members
120 [EditorBrowsable(EditorBrowsableState.Advanced)]
130 [EditorBrowsable(EditorBrowsableState.Advanced)]
136 List<int> references =
new List<int>();
137 for (
int x = 0; x < this.Count; x++)
146 if (references.Count > 0)
165 [EditorBrowsable(EditorBrowsableState.Advanced)]
175 [EditorBrowsable(EditorBrowsableState.Advanced)]
181 if (info.
Values.ContainsKey(
"$list"))
183 List<int> references = (List<int>)info.
Values[
"$list"].Value;
184 foreach (
int reference in references)
186 T child = (T)formatter.
GetObject(reference);
Class that allows setting of property values on current business object without raising PropertyChang...
void Dispose()
Disposes the object.
LoadListModeObject(IMobileList target)
Create instance of type
Inherit from this base class to easily create a serializable list class.
virtual void OnGetChildren(SerializationInfo info, MobileFormatter formatter)
Override this method to get custom child object values from the serialization stream.
virtual void OnSetState(SerializationInfo info)
Override this method to set custom field values into the serialization stream.
virtual void OnGetState(SerializationInfo info)
Override this method to get custom field values from the serialization stream.
virtual void OnSetChildren(SerializationInfo info, MobileFormatter formatter)
Override this method to set custom child object values into the serialization stream.
LoadListModeObject LoadListMode
By wrapping this property inside Using block you can set property values on current business object w...
virtual void SetLoadListMode(bool enabled)
Sets the load list mode for the list
A strongly-typed resource class, for looking up localized strings, etc.
static string CannotSerializeCollectionsNotOfIMobileObject
Looks up a localized string similar to Cannot serialize collections not of type IMobileObject.
Object containing the serialization data for a specific object.
Dictionary< string, FieldData > Values
Dictionary containg field data.
int ReferenceId
Reference number for this object.
void AddValue(string name, object value)
Adds a value to the serialization stream.
Extension of IMobileObject for list types
void SetLoadListMode(bool enabled)
Sets the LoadListMode for the collection
Interface to be implemented by any object that supports serialization by the SerializationFormatterFa...
void GetChildren(SerializationInfo info, MobileFormatter formatter)
Method called by MobileFormatter when an object should serialize its child references.
void GetState(SerializationInfo info)
Method called by MobileFormatter when an object should serialize its data.
void SetChildren(SerializationInfo info, MobileFormatter formatter)
Method called by MobileFormatter when an object should deserialize its child references.
void SetState(SerializationInfo info)
Method called by MobileFormatter when an object should be deserialized.
@ Serializable
Prevents updating or inserting until the transaction is complete.