Beispiel #1
0
 /// <summary>
 /// Method called by MobileFormatter when an object
 /// should deserialize its child references. The data should be
 /// deserialized from the SerializationInfo parameter.
 /// </summary>
 /// <param name="info">
 /// Object containing the serialized data.
 /// </param>
 /// <param name="formatter">
 /// Reference to the formatter performing the deserialization.
 /// </param>
 protected override void OnSetChildren(Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter)
 {
     if (info.Children.ContainsKey("_deletedList"))
     {
         var childData = info.Children["_deletedList"];
         _deletedList = (MobileList <C>)formatter.GetObject(childData.ReferenceId);
     }
     base.OnSetChildren(info, formatter);
 }
Beispiel #2
0
 /// <summary>
 /// Method called by MobileFormatter when an object
 /// should serialize its child references. The data should be
 /// serialized into the SerializationInfo parameter.
 /// </summary>
 /// <param name="info">
 /// Object to contain the serialized data.
 /// </param>
 /// <param name="formatter">
 /// Reference to the formatter performing the serialization.
 /// </param>
 protected override void OnGetChildren(Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter)
 {
     base.OnGetChildren(info, formatter);
     if (_deletedList != null)
     {
         var fieldManagerInfo = formatter.SerializeObject(_deletedList);
         info.AddChild("_deletedList", fieldManagerInfo.ReferenceId);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Override this method to get custom field values
 /// from the serialization stream.
 /// </summary>
 /// <param name="info">Serialization info.</param>
 /// <param name="mode">Serialization mode.</param>
 protected override void OnGetState(Csla.Serialization.Mobile.SerializationInfo info, Csla.Core.StateMode mode)
 {
     info.AddValue("CslaPrincipal.Identity", MobileFormatter.Serialize(_identity));
     base.OnGetState(info, mode);
 }
Beispiel #4
0
 /// <summary>
 /// Override this method to set custom field values
 /// ito the serialization stream.
 /// </summary>
 /// <param name="info">Serialization info.</param>
 /// <param name="mode">Serialization mode.</param>
 protected override void OnSetState(Csla.Serialization.Mobile.SerializationInfo info, Csla.Core.StateMode mode)
 {
     base.OnSetState(info, mode);
     _identity = (IIdentity)MobileFormatter.Deserialize(info.GetValue <byte[]>("CslaPrincipal.Identity"));
 }
Beispiel #5
0
 protected override void OnSetState(Csla.Serialization.Mobile.SerializationInfo info, Csla.Core.StateMode mode)
 {
     _name = info.GetValue <string>("_name");
     base.OnSetState(info, mode);
 }