using Newtonsoft.Json; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.ExtensionMethods; namespace Tango.FSE.Procedures { /// /// Represents a procedure result. /// public class Result { /// /// Gets or sets the type. /// public ResultType Type { get; set; } /// /// Gets or sets the result name. /// public String Name { get; set; } /// /// Gets or sets the result value. /// public Object Value { get; set; } [JsonIgnore] public bool IsGraph { get; set; } [JsonIgnore] public bool IsBitmap { get; set; } [JsonIgnore] public bool IsValueArray { get { return Value != null && typeof(IEnumerable).IsAssignableFrom(Value.GetType()) && Value.GetType() != typeof(String); } } public Result() { } public Result(ResultType type, String name, Object value) : this() { Type = type; Name = name; Value = value; } public override string ToString() { return this.ToJsonString(); } } }