protected override void OnSetState(Csla.Serialization.Mobile.SerializationInfo info, StateMode mode) { _username = (string)info.Values["_username"].Value; _password = (string)info.Values["_password"].Value; _roles = (string)info.Values["_roles"].Value; base.OnSetState(info, mode); }
protected override void OnGetState(Csla.Serialization.Mobile.SerializationInfo info, StateMode mode) { info.AddValue("_username", _username); info.AddValue("_password", _password); info.AddValue("_roles", _roles); base.OnGetState(info, mode); }
protected override void OnSetState(SerializationInfo info, StateMode mode) { this.Name = info.GetValue <string>("Name"); }
/// <summary> /// Override this method to insert your field values /// into the MobileFormatter serialzation stream. /// </summary> /// <param name="info"> /// Object containing the data to serialize. /// </param> /// <param name="mode"> /// The StateMode indicating why this method was invoked. /// </param> protected override void OnGetState(SerializationInfo info, StateMode mode) { info.AddValue("_bindingEdit", _bindingEdit); base.OnGetState(info, mode); }
protected override void OnSetState(SerializationInfo info, StateMode mode) { base.OnSetState(info, mode); _name = info.GetValue <string>("_name"); }
protected override void OnSetState(Csla.Serialization.Mobile.SerializationInfo info, StateMode mode) { base.OnSetState(info, mode); _customerId = info.GetValue <int>("_customerId"); }
/// <summary> /// Sets the state of the object from serialization. /// </summary> /// <param name="info">Serialization state</param> /// <param name="mode">Serialization mode</param> protected override void OnSetState(SerializationInfo info, StateMode mode) { if (mode == StateMode.Serialization) { _stateStack.Clear(); if (info.Values.ContainsKey("_stateStack")) { //string xml = info.GetValue<string>("_stateStack"); byte[] xml = info.GetValue<byte[]>("_stateStack"); MobileList<SerializationInfo> list = (MobileList<SerializationInfo>)MobileFormatter.Deserialize(xml); SerializationInfo[] layers = list.ToArray(); Array.Reverse(layers); foreach (SerializationInfo layer in layers) _stateStack.Push(layer); } } _bindingEdit = info.GetValue<bool>("_bindingEdit"); base.OnSetState(info, mode); }
/// <summary> /// Override this method to retrieve your field values /// from the MobileFormatter serialzation stream. /// </summary> /// <param name="info"> /// Object containing the data to serialize. /// </param> /// <param name="mode"> /// The StateMode indicating why this method was invoked. /// </param> protected override void OnSetState(SerializationInfo info, StateMode mode) { _stateStack.Clear(); _bindingEdit = info.GetValue<bool>("_bindingEdit"); base.OnSetState(info, mode); }
/// <summary> /// Override this method to retrieve your field values /// from the MobileFormatter serialzation stream. /// </summary> /// <param name="info"> /// Object containing the data to serialize. /// </param> /// <param name="mode"> /// The StateMode indicating why this method was invoked. /// </param> protected override void OnSetState(SerializationInfo info, StateMode mode) { _processThroughPriority = info.GetValue<int>("_processThroughPriority"); _ruleSet = info.GetValue<string>("_ruleSet"); _cascadeOnDirtyProperties = info.GetValue<bool>("_cascadeWhenChanged"); //_isBusy = info.GetValue<bool>("_isBusy"); #if SILVERLIGHT || NETFX_CORE if (mode == StateMode.Serialization) { _stateStack.Clear(); if (info.Values.ContainsKey("_stateStack")) { byte[] xml = info.GetValue<byte[]>("_stateStack"); MobileList<SerializationInfo> list = (MobileList<SerializationInfo>)MobileFormatter.Deserialize(xml); SerializationInfo[] layers = list.ToArray(); Array.Reverse(layers); foreach (SerializationInfo layer in layers) _stateStack.Push(layer); } } #endif base.OnSetState(info, mode); }
/// <summary> /// Override this method to retrieve your field values /// from the MobileFormatter serialzation stream. /// </summary> /// <param name="info"> /// Object containing the data to serialize. /// </param> /// <param name="mode"> /// The StateMode indicating why this method was invoked. /// </param> protected override void OnSetState(SerializationInfo info, StateMode mode) { _ruleName = info.GetValue<string>("_ruleName"); _description = info.GetValue<string>("_description"); _property = info.GetValue<string>("_property"); _severity = info.GetValue<RuleSeverity>("_severity"); _originProperty = info.GetValue<string>("_originProperty"); base.OnSetState(info, mode); }
internal static extern bool ilDisable(StateMode Mode);
protected override void OnGetState(SerializationInfo info, StateMode mode) { info.AddValue("Name", Name); }
protected override void OnSetState(SerializationInfo info, StateMode mode) { base.OnSetState(info, mode); Result = info.GetValue <bool>("Result"); }
//ノード初期化 TODO:最適化 private void Init() { //ステートがアニメーションならば if (o.GetComponent <AnimationState>() != null) { var cla = o.GetComponent <AnimationState>(); states = cla.characterProperty.States; stateMode = StateMode.Animation; } //ノーマル(UIとか) else if (o.GetComponent <StateMachineMonoBehaiviour>() != null) { var cla = o.GetComponent <StateMachineMonoBehaiviour>(); states = cla.states; } else { return; } if (states.Count == 0) { return; } nodeDictionary = new Dictionary <string, Node>(); //playModeStateChangedイベントにメソッド登録 EditorApplication.playModeStateChanged += OnChangedPlayMode;//プレイモードの変更時メソッド stateClass = o.GetComponent <StateMachineMonoBehaiviour>(); int id = 0; foreach (StateString ss in states) { nodeDictionary.Add(ss.getStateName(), new Node(ss.getStateName(), ss.nodePosition, id, ss, o)); id++; //ウィンドウID } root = nodeDictionary[states[0].getStateName()]; //基底ノード //ステートを見て関係を格納 foreach (StateJudge judge in states[0].stateJudges) { if (nodeDictionary[judge.nextState] != null) { root.childs.Add(nodeDictionary[judge.nextState]); } } for (int i = 1; i < states.Count; i++) { Node nowNode = nodeDictionary[states[i].getStateName()]; if (states[i].stateJudges.Count > 0) { foreach (StateJudge judge in states[i].stateJudges) { if (nodeDictionary[judge.nextState] != null) { nowNode.childs.Add(nodeDictionary[judge.nextState]); } } } } stateBuffer = states; }
public State(PacketStream stream, StateMode mode) { throw new NotImplementedException(); }
private void atContinue() { atReadyActiveState(); stateMode = StateMode.Active; }
public void doChangeThisStateToFinished() { Debugger.printLog("doChangeThisStateToFinished: " + name); stateMode = StateMode.Finished; }
protected override void OnSetState(SerializationInfo info, StateMode mode) { Name = info.GetValue<string>("Name"); base.OnSetState(info, mode); }
protected override void OnSetState(SerializationInfo info, StateMode mode) { base.OnSetState(info, mode); if (info.Values.ContainsKey("OrderId")) { _bag["OrderId"] = info.GetValue <System.Int32>("OrderId"); } if (info.Values.ContainsKey("UserId")) { _bag["UserId"] = info.GetValue <System.String>("UserId"); } if (info.Values.ContainsKey("OrderDate")) { _bag["OrderDate"] = info.GetValue <System.DateTime>("OrderDate"); } if (info.Values.ContainsKey("ShipAddr1")) { _bag["ShipAddr1"] = info.GetValue <System.String>("ShipAddr1"); } if (info.Values.ContainsKey("ShipAddr2")) { _bag["ShipAddr2"] = info.GetValue <System.String>("ShipAddr2"); } if (info.Values.ContainsKey("ShipCity")) { _bag["ShipCity"] = info.GetValue <System.String>("ShipCity"); } if (info.Values.ContainsKey("ShipState")) { _bag["ShipState"] = info.GetValue <System.String>("ShipState"); } if (info.Values.ContainsKey("ShipZip")) { _bag["ShipZip"] = info.GetValue <System.String>("ShipZip"); } if (info.Values.ContainsKey("ShipCountry")) { _bag["ShipCountry"] = info.GetValue <System.String>("ShipCountry"); } if (info.Values.ContainsKey("BillAddr1")) { _bag["BillAddr1"] = info.GetValue <System.String>("BillAddr1"); } if (info.Values.ContainsKey("BillAddr2")) { _bag["BillAddr2"] = info.GetValue <System.String>("BillAddr2"); } if (info.Values.ContainsKey("BillCity")) { _bag["BillCity"] = info.GetValue <System.String>("BillCity"); } if (info.Values.ContainsKey("BillState")) { _bag["BillState"] = info.GetValue <System.String>("BillState"); } if (info.Values.ContainsKey("BillZip")) { _bag["BillZip"] = info.GetValue <System.String>("BillZip"); } if (info.Values.ContainsKey("BillCountry")) { _bag["BillCountry"] = info.GetValue <System.String>("BillCountry"); } if (info.Values.ContainsKey("Courier")) { _bag["Courier"] = info.GetValue <System.String>("Courier"); } if (info.Values.ContainsKey("TotalPrice")) { _bag["TotalPrice"] = info.GetValue <System.Decimal>("TotalPrice"); } if (info.Values.ContainsKey("BillToFirstName")) { _bag["BillToFirstName"] = info.GetValue <System.String>("BillToFirstName"); } if (info.Values.ContainsKey("BillToLastName")) { _bag["BillToLastName"] = info.GetValue <System.String>("BillToLastName"); } if (info.Values.ContainsKey("ShipToFirstName")) { _bag["ShipToFirstName"] = info.GetValue <System.String>("ShipToFirstName"); } if (info.Values.ContainsKey("ShipToLastName")) { _bag["ShipToLastName"] = info.GetValue <System.String>("ShipToLastName"); } if (info.Values.ContainsKey("AuthorizationNumber")) { _bag["AuthorizationNumber"] = info.GetValue <System.Int32>("AuthorizationNumber"); } if (info.Values.ContainsKey("Locale")) { _bag["Locale"] = info.GetValue <System.String>("Locale"); } }
public void doContinue() { stateMode = StateMode.Continue; }
/// <summary> /// Override this method to retrieve your field values /// from the MobileFormatter serialzation stream. /// </summary> /// <param name="info"> /// Object containing the data to serialize. /// </param> /// <param name="mode"> /// The StateMode indicating why this method was invoked. /// </param> protected override void OnSetState(SerializationInfo info, StateMode mode) { string type = (string)info.Values["_businessObjectType"].Value; Type businessObjecType = Csla.Reflection.MethodCaller.GetType(type); SetPropertyList(businessObjecType); if (mode == StateMode.Serialization) { _stateStack.Clear(); if (info.Values.ContainsKey("_stateStack")) { var stackArray = info.GetValue <byte[][]>("_stateStack"); foreach (var item in stackArray.Reverse()) { _stateStack.Push(item); } } _fieldData = new IFieldData[_propertyList.Count]; } foreach (IPropertyInfo property in _propertyList) { if (info.Values.ContainsKey(property.Name)) { SerializationInfo.FieldData value = info.Values[property.Name]; IFieldData data = GetOrCreateFieldData(property); if (value.Value != null && mode == StateMode.Undo && typeof(IMobileObject).IsAssignableFrom(Nullable.GetUnderlyingType(property.Type) ?? property.Type) && !typeof(IUndoableObject).IsAssignableFrom(Nullable.GetUnderlyingType(property.Type) ?? property.Type)) { data.Value = SerializationFormatterFactory.GetFormatter().Deserialize((byte[])value.Value); } else { data.Value = value.Value; } if (!value.IsDirty) { data.MarkClean(); } } else if (mode == StateMode.Undo && !((property.RelationshipType & RelationshipTypes.PrivateField) == RelationshipTypes.PrivateField)) { IFieldData data = GetFieldData(property); if (data != null) { if (!info.Values.ContainsKey("child_" + property.Name) || !info.GetValue <bool>("child_" + property.Name)) { _fieldData[property.Index] = null; } // We don't want to reset children during an undo. else if (!typeof(IMobileObject).IsAssignableFrom(data.Value.GetType())) { data.Value = property.DefaultValue; } } } } base.OnSetState(info, mode); }
/// <summary> /// Method called by MobileFormatter when an object /// should be deserialized. The data should be /// deserialized from the SerializationInfo parameter. /// </summary> /// <param name="info"> /// Object containing the serialized data. /// </param> /// <param name="mode">Serialization mode.</param> protected override void OnSetState(SerializationInfo info, StateMode mode) { _forceInit = _forceInit && false; base.OnSetState(info, mode); }
/// <summary> /// Override this method to retrieve your field values /// from the MobileFormatter serialzation stream. /// </summary> /// <param name="info"> /// Object containing the data to serialize. /// </param> /// <param name="mode"> /// The StateMode indicating why this method was invoked. /// </param> protected override void OnSetState(SerializationInfo info, StateMode mode) { string type = (string)info.Values["_businessObjectType"].Value; Type businessObjecType = Csla.Reflection.MethodCaller.GetType(type); SetPropertyList(businessObjecType); if (mode == StateMode.Serialization) { _stateStack.Clear(); if (info.Values.ContainsKey("_stateStack")) { //string xml = info.GetValue<string>("_stateStack"); byte[] xml = info.GetValue <byte[]>("_stateStack"); MobileList <SerializationInfo> list = (MobileList <SerializationInfo>)MobileFormatter.Deserialize(xml); SerializationInfo[] layers = list.ToArray(); Array.Reverse(layers); foreach (SerializationInfo layer in layers) { _stateStack.Push(layer); } } } // Only clear this list on serialization, otherwise you'll lose // your children during an undo. if (mode == StateMode.Serialization) { _fieldData = new IFieldData[_propertyList.Count]; } foreach (IPropertyInfo property in _propertyList) { if (info.Values.ContainsKey(property.Name)) { SerializationInfo.FieldData value = info.Values[property.Name]; IFieldData data = GetOrCreateFieldData(property); if (value.Value != null && mode == StateMode.Undo && typeof(IMobileObject).IsAssignableFrom(Nullable.GetUnderlyingType(property.Type) ?? property.Type) && !typeof(IUndoableObject).IsAssignableFrom(Nullable.GetUnderlyingType(property.Type) ?? property.Type)) { data.Value = MobileFormatter.Deserialize((byte[])value.Value); } else { data.Value = value.Value; } if (!value.IsDirty) { data.MarkClean(); } } else if (mode == StateMode.Undo && !((property.RelationshipType & RelationshipTypes.PrivateField) == RelationshipTypes.PrivateField)) { IFieldData data = GetFieldData(property); if (data != null) { if (!info.Values.ContainsKey("child_" + property.Name) || !info.GetValue <bool>("child_" + property.Name)) { _fieldData[property.Index] = null; } // We don't want to reset children during an undo. else if (!typeof(IMobileObject).IsAssignableFrom(data.Value.GetType())) { data.Value = property.DefaultValue; } } } } base.OnSetState(info, mode); }
protected override void OnGetState(Csla.Serialization.Mobile.SerializationInfo info, StateMode mode) { base.OnGetState(info, mode); info.AddValue("_customerId", _customerId); }
public StateModeActivation GetMode(StateMode mode) { return(State_getMode(GetNativeReference(), mode)); }
public static void RegisterForBinding(this IBindingContainer bindingContainer, StateMode stateMode) { BinderBase binder = BindingHelpers.CreateBinder(bindingContainer, stateMode); }
private static extern StateModeActivation State_getMode(IntPtr state_reference, StateMode mode);
protected override void OnGetState(SerializationInfo info, StateMode mode) { base.OnGetState(info, mode); info.AddValue("_name", _name); }
/// <summary> /// Override this method to retrieve your field values /// from the MobileFormatter serialzation stream. /// </summary> /// <param name="info"> /// Object containing the data to serialize. /// </param> /// <param name="mode"> /// The StateMode indicating why this method was invoked. /// </param> protected override void OnSetState(SerializationInfo info, StateMode mode) { base.OnSetState(info, mode); _value = info.GetValue <C>("Csla.Xaml.SingleCriteria._value"); }
/// <summary> /// Override this method to insert your field values /// into the MobileFormatter serialzation stream. /// </summary> /// <param name="info"> /// Object containing the data to serialize. /// </param> /// <param name="mode"> /// The StateMode indicating why this method was invoked. /// </param> protected override void OnGetState(SerializationInfo info, StateMode mode) { base.OnGetState(info, mode); info.AddValue("Csla.Xaml.SingleCriteria._value", _value); }
protected virtual void OnSetState(SerializationInfo info, StateMode mode) { }
/// <summary> /// Override this method to insert your field values /// into the MobileFormatter serialzation stream. /// </summary> /// <param name="info"> /// Object containing the data to serialize. /// </param> /// <param name="mode"> /// The StateMode indicating why this method was invoked. /// </param> protected override void OnGetState(SerializationInfo info, StateMode mode) { info.AddValue("_processThroughPriority", _processThroughPriority); info.AddValue("_ruleSet", _ruleSet); info.AddValue("_cascadeWhenChanged", _cascadeOnDirtyProperties); //info.AddValue("_isBusy", _isBusy); #if SILVERLIGHT || NETFX_CORE if (mode == StateMode.Serialization) { if (_stateStack.Count > 0) { MobileList<SerializationInfo> list = new MobileList<SerializationInfo>(_stateStack.ToArray()); byte[] xml = MobileFormatter.Serialize(list); info.AddValue("_stateStack", xml); } } #endif base.OnGetState(info, mode); }
/// <summary> /// Override this method to manually 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(SerializationInfo info, StateMode mode) { base.OnGetState(info, mode); info.AddValue("NameValuePair._key", _key); info.AddValue("NameValuePair._value", _value); }
protected override void OnGetState(SerializationInfo info, StateMode mode) { info.AddValue("Name", Name); base.OnGetState(info, mode); }
/// <summary> /// Override this method to manually set custom field /// values into the serialization stream. /// </summary> /// <param name="info">Serialization info.</param> /// <param name="mode">Serialization mode.</param> protected override void OnSetState(SerializationInfo info, StateMode mode) { base.OnSetState(info, mode); _key = info.GetValue <K>("NameValuePair._key"); _value = info.GetValue <V>("NameValuePair._value"); }
/// <summary> /// Override this method to insert your field values /// into the MobileFormatter serialzation stream. /// </summary> /// <param name="info"> /// Object containing the data to serialize. /// </param> /// <param name="mode"> /// The StateMode indicating why this method was invoked. /// </param> protected override void OnGetState(SerializationInfo info, StateMode mode) { info.AddValue("_ruleName", _ruleName); info.AddValue("_description", _description); info.AddValue("_property", _property); info.AddValue("_severity", (int)_severity); info.AddValue("_originProperty", _originProperty); base.OnGetState(info, mode); }
/// <summary> /// Gets the state of the object for serialization. /// </summary> /// <param name="info">Serialization state</param> /// <param name="mode">Serialization mode</param> protected override void OnGetState(SerializationInfo info, StateMode mode) { if (mode == StateMode.Serialization) { if (_stateStack.Count > 0) { MobileList<SerializationInfo> list = new MobileList<SerializationInfo>(_stateStack.ToArray()); byte[] xml = MobileFormatter.Serialize(list); info.AddValue("_stateStack", xml); } } info.AddValue("_bindingEdit", _bindingEdit); base.OnGetState(info, mode); }
public void doPause() { stateMode = StateMode.Paused; }