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 ?? ""); }
protected override void ToJson(ObjectBuilder builder) { base.ToJson(builder); builder.Member("StartActivity", this.StartActivity); builder.Member("FinishActivity", this.FinishActivity); }
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()); }
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); }
public string ToJson() { using (System.IO.StringWriter writer = new System.IO.StringWriter()) { using (var builder = new ObjectBuilder(writer, "")) { ToJson(builder); } return writer.ToString(); } }
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); } } } }
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); }
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)); }
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); } } } }
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); } } } }
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()); } } } }
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); } } } }
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); } } } }
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); } } } }
protected override void ToJson(ObjectBuilder builder) { base.ToJson(builder); }
protected override void ToJson(ObjectBuilder builder) { base.ToJson(builder); if (!string.IsNullOrEmpty(this.ProccessAlias)) builder.Member("ProccessAlias", this.ProccessAlias); builder.Member("InstanceType", this.InstanceType); }