8using System.Collections.Generic;
12using System.Reflection;
26 private bool _keyIsMobile;
27 private bool _valueIsMobile;
83 return base.ContainsKey(key);
86#if !(ANDROID || IOS) && !NETFX_CORE
93 System.Runtime.Serialization.StreamingContext context)
100 private void DetermineTypes()
106 #region IMobileObject Members
108 private const string _keyPrefix =
"k";
109 private const string _valuePrefix =
"v";
113 info.
AddValue(
"count", this.Keys.Count);
119 foreach (var key
in this.Keys)
128 info.
AddValue(_keyPrefix + count, key);
139 info.
AddValue(_valuePrefix + count, value);
150 int count = info.GetValue<
int>(
"count");
152 for (
int index = 0; index < count; index++)
158 key = info.GetValue<K>(_keyPrefix + index);
164 value = info.GetValue<V>(_valuePrefix + index);
Defines a dictionary that can be serialized through the SerializationFormatterFactory....
MobileDictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
Creates an instance of the object for serialization.
MobileDictionary(Dictionary< K, V > dict)
Creates an instance of the object based on the supplied dictionary, whose elements are copied to the ...
MobileDictionary(int capacity)
Creates an instance of the object based on the supplied dictionary, whose elements are copied to the ...
MobileDictionary(IEqualityComparer< K > comparer)
Creates an instance of the object based on the supplied dictionary, whose elements are copied to the ...
bool Contains(K key)
Gets a value indicating whether the dictionary contains the specified key value.
MobileDictionary()
Creates an instance of the object.
Object containing the serialization data for a specific object.
int ReferenceId
Reference number for this object.
Dictionary< string, ChildData > Children
Dictionary containing child reference data.
void AddChild(string name, int referenceId)
Adds a child to the list of child references.
void AddValue(string name, object value)
Adds a value to the serialization stream.
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.