Esempio n. 1
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);
             }
         }
     }
 }
Esempio n. 2
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);
                    }
                }
            }

        }
Esempio n. 3
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());
             }
         }
     }
 }
Esempio n. 4
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);
             }
         }
     }
 }