예제 #1
0
 protected override void ToJson(ObjectBuilder builder)
 {
     base.ToJson(builder);
     if (this.RuntimeId != null) builder.Member("RuntimeId",this.RuntimeId.Value);
     builder.Member("StartAlias", this.StartAlias??"");
     builder.Member("FinishAlias", this.FinishAlias ?? "");
 }
예제 #2
0
 protected override void ToJson(ObjectBuilder builder)
 {
     base.ToJson(builder);
     builder.Member("StartActivity", this.StartActivity);
     builder.Member("FinishActivity", this.FinishActivity);
     
 }
예제 #3
0
 protected override void ToJson(ObjectBuilder builder)
 {
     base.ToJson(builder);
     builder.Member("ConstraintKind", Enum.GetName(typeof(ConstraintKinds), this.ConstraintKind));
     builder.Member("Constraint",this.Constraint);
     builder.Member("From", this.From.ToString());
     builder.Member("To", this.To.ToString());
 }
예제 #4
0
        protected override void ToJson(ObjectBuilder builder)
        {
            base.ToJson(builder);
            builder.Member("From", this.From);
            builder.Member("To", this.To);
            builder.Member("ConstraintKind", Enum.GetName(typeof(ConstraintKinds), this.ConstraintKind));
            if (this.ConstraintKind != ConstraintKinds.None && !string.IsNullOrEmpty(this.Constraint)) builder.Member("Constraint", this.Constraint);

        }
예제 #5
0
 public string ToJson() {
     using (System.IO.StringWriter writer = new System.IO.StringWriter())
     {
         using (var builder = new ObjectBuilder(writer, ""))
         {
             ToJson(builder);
         }
         return writer.ToString();
     }
 }
예제 #6
0
 protected override void ToJson(ObjectBuilder builder)
 {
     base.ToJson(builder);
     if (this._parallelActivities.Count > 0) {
         using (var ids = builder.ArrayMember("ParallelActivities")) {
             foreach (var id in this._parallelActivities) {
                 ids.Add(id);
             }
         }
     }
 }
예제 #7
0
        protected override void ToJson(ObjectBuilder builder)
        {
            base.ToJson(builder);
            if(!string.IsNullOrEmpty(this.Deal))builder.Member("Deal", this.Deal);
            builder.Member("StartMode", Enum.GetName(typeof(ExecutionModes), this.StartMode));
            builder.Member("FinishMode", Enum.GetName(typeof(ExecutionModes), this.FinishMode));
            builder.Member("StartConstraintKind", Enum.GetName(typeof(ConstraintKinds), this.StartConstraintKind));
            builder.Member("FinishConstraintKind", Enum.GetName(typeof(ConstraintKinds), this.FinishConstraintKind));
            if (this.StartConstraintKind != ConstraintKinds.None && !string.IsNullOrEmpty(this.StartConstraint)) builder.Member("StartConstraint", this.StartConstraint);
            if (this.FinishConstraintKind != ConstraintKinds.None && !string.IsNullOrEmpty(this.FinishConstraint)) builder.Member("FinishConstraint", this.FinishConstraint);

        }
예제 #8
0
 protected override void ToJson(ObjectBuilder builder)
 {
     base.ToJson(builder);
     builder.Member("ActivityType", this.ActivityType);
     builder.Member("Deal", this.Deal);
     builder.Member("StartMode", Enum.GetName(typeof(ExecutionModes),this.StartMode));
     builder.Member("FinishMode", Enum.GetName(typeof(ExecutionModes), this.FinishMode));
     builder.Member("StartConstraint", this.StartConstraint);
     builder.Member("FinishConstraint", this.FinishConstraint);
     builder.Member("StartConstraintKind", Enum.GetName(typeof(ConstraintKinds), this.StartConstraintKind));
     builder.Member("FinishConstraintKind", Enum.GetName(typeof(ConstraintKinds), this.FinishConstraintKind));
 }
예제 #9
0
        protected override void ToJson(ObjectBuilder builder)
        {
            base.ToJson(builder);
            builder.Member("BlockId", this.BlockId);
            if (this.Actived.Count > 0) {
                using (var actived = builder.ArrayMember("Actived")) {
                    foreach (var id in this.Actived) {
                        actived.Add(id);
                    }
                }
            }

        }
예제 #10
0
파일: Info.cs 프로젝트: yanyitec/Yanyitec
 protected virtual void ToJson(ObjectBuilder builder)
 {
     
     builder.Member("Id", this.Id.ToString());
     if(!string.IsNullOrEmpty(this.Alias))builder.Member("Alias", this.Alias);
     builder.Member("InstanceType", this.InstanceType);
     builder.Member("ProccessId", this.ProccessId);
     if (this._extras.Count > 0)
     {
         using (var extra = builder.ObjectMember("Extras"))
         {
             foreach (var pair in this._extras)
             {
                 extra.Member(pair.Key, pair.Value);
             }
         }
     }
 }
예제 #11
0
 protected override void ToJson(ObjectBuilder builder)
 {
     base.ToJson(builder);
     builder.Member("State", Enum.GetName(typeof(ActivityStates), this.State));
     builder.Member("ExecutionState", Enum.GetName(typeof(ExecutionStates), this.ExecutionState));
     if (this.ExecutionState == ExecutionStates.Suspended && this.ResumeTime != null) builder.Member("ResumeTime", this.ResumeTime.Value.ToString());
     if (this.Result != null) builder.Member("Result", this.Result);
     if (this._nexts.Count > 0)
     {
         using (var nexts = builder.ArrayMember("Nexts"))
         {
             foreach (var nextId in this._nexts)
             {
                 nexts.Add(nextId.ToString());
             }
         }
     }
 }
예제 #12
0
        protected virtual void ToJson(ObjectBuilder builder)
        {
            if(!string.IsNullOrEmpty(this.Alias))builder.Member("Alias", this.Alias);
            if (!string.IsNullOrEmpty(this.Name))builder.Member("Name", this.Name);
            if(!string.IsNullOrEmpty(this.Description))builder.Member("Description", this.Description);
            builder.Member("CreateTime", this.CreateTime.ToString("yyyy-MM-ddThh:mm:ss"));
            builder.Member("UpdateTime", this.UpdateTime.ToString("yyyy-MM-ddThh:mm:ss"));
            if (this._extras.Count > 0) {
                using (var extra = builder.ObjectMember("Extras"))
                {
                    foreach (var pair in this._extras)
                    {
                        extra.Member(pair.Key, pair.Value);
                    }
                }
            }

            
        }
예제 #13
0
 protected void ToJson(ObjectBuilder builder) {
     builder.Member("Id",this.Id);
     builder.Member("ActivityDefinationId",this.ActivityDefinationId);
     builder.Member("ActivityId", this.ActivityId);
     builder.Member("Description",this.Description);
     if (this.ActivedActivityIds != null) {
         using (var arr = builder.ArrayMember("ActivedActivityIds")) {
             foreach (var item in this.ActivedActivityIds) arr.Add(item);
         }
     }
     if (this.Extras != null)
     {
         using (var extra = builder.ObjectMember("Extras"))
         {
             foreach (var pair in this.Extras)
             {
                 extra.Member(pair.Key, pair.Value);
             }
         }
     }
 }
예제 #14
0
 protected virtual void ToJson(ObjectBuilder builder) {
     builder.Member("Type",this.Type??this.GetType().FullName);
     builder.Member("DefinationId",this.DefinationId.ToString());
     builder.Member("RuntimeId", this.RuntimeId.ToString());
     builder.Member("ContainerId", this.ContainerId.ToString());
     builder.Member("ProcessId", this.ProcessId.ToString());
     builder.Member("Alias", this.Alias);
     builder.Member("Name", this.Name);
     builder.Member("Description", this.Description);
     builder.Member("_State", Enum.GetName(typeof(ActivityStates), this._State));
     builder.Member("_ExecutionState", Enum.GetName(typeof(ExecutionStates), this._ExecutionState));
     builder.Member("_x", this._x);
     builder.Member("_y", this._y);
     builder.Member("_width", this._width);
     builder.Member("_height", this._height);
     if (this.Extras != null) {
         using (var extra = builder.ObjectMember("Extras")) {
             foreach (var pair in this.Extras) {
                 extra.Member(pair.Key,pair.Value);
             }
         }
     }
 }
예제 #15
0
 protected override void ToJson(ObjectBuilder builder)
 {
     base.ToJson(builder);
     
 }
예제 #16
0
 protected override void ToJson(ObjectBuilder builder)
 {
     base.ToJson(builder);
     if (!string.IsNullOrEmpty(this.ProccessAlias)) builder.Member("ProccessAlias", this.ProccessAlias);
     builder.Member("InstanceType", this.InstanceType);
 }