public override IDictionary <string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            WfForwardTransitionDescriptor forwardTranDesp = (WfForwardTransitionDescriptor)obj;

            IDictionary <string, object> dictionary = base.Serialize(obj, serializer);

            return(dictionary);
        }
        public virtual IWfTransitionDescriptor Clone()
        {
            WfForwardTransitionDescriptor transition = new WfForwardTransitionDescriptor();

            CloneProperties(transition);

            return(transition);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 生成空前向线定义的JSON串
        /// </summary>
        /// <returns></returns>
        public static string GetEmptyForwardTransitionDescriptorJsonString()
        {
            RegisterConverters();

            WfForwardTransitionDescriptor transition = new WfForwardTransitionDescriptor();

            return(JSONSerializerExecute.Serialize(transition));
        }
        public IWfForwardTransitionDescriptor AddForwardTransition(IWfActivityDescriptor toActivity)
        {
            ExceptionHelper.FalseThrow <ArgumentNullException>(toActivity != null, "toActivity");

            WfForwardTransitionDescriptor transition = new WfForwardTransitionDescriptor(toActivity.Process.FindNotUsedTransitionKey());

            AddTransition(toActivity, transition);

            return(transition);
        }
        internal protected override void CloneProperties(WfKeyedDescriptorBase destObject)
        {
            string originalKey = destObject.Key;

            base.CloneProperties(destObject);

            WfForwardTransitionDescriptor transition = (WfForwardTransitionDescriptor)destObject;

            if (originalKey.IsNullOrEmpty() && this.ProcessInstance != null)
            {
                transition.Key = this.ProcessInstance.Descriptor.FindNotUsedTransitionKey();
            }
            else
            {
                transition.Key = originalKey;
            }

            transition.Condition = this.Condition.Clone();
            transition.Variables.CopyFrom(this.Variables, v => v.Clone());
        }
        public override object Deserialize(IDictionary <string, object> dictionary, Type type, System.Web.Script.Serialization.JavaScriptSerializer serializer)
        {
            WfForwardTransitionDescriptor forwardTranDesp = (WfForwardTransitionDescriptor)base.Deserialize(dictionary, type, serializer);

            return(forwardTranDesp);
        }