Beispiel #1
0
 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);
             }
         }
     }
 }
Beispiel #2
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);
                    }
                }
            }

            
        }
Beispiel #3
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);
             }
         }
     }
 }
Beispiel #4
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);
             }
         }
     }
 }