public WebMethodInfo(string verb, MethodInfo method, bool requiresAuth, Type modelType, Propex targets) { this.Verb = verb; this.method = method; this.RequiresAuthentication = requiresAuth; this.Targets = targets; this.Parameters = method.GetParameters(); this.ModelType = modelType; }
public JsonWriterOptions(int maxDepth = JsonWriter.MAX_DEPTH, char formatChar = '\t', bool formatted = false, bool ignoreDirectionRestrictions = false, Propex targets = null, IList<Action<object>> augmentors = null) { Formatted = formatted; FormatChar = formatChar; MaxDepth = maxDepth; chars = "".PadRight(maxDepth, formatChar).ToCharArray(); IgnoreDirectionRestrictions = ignoreDirectionRestrictions; Targets = targets; Augmentors = augmentors; }
// Methods public PropexDebugView(Propex propex) { this.propex = propex; }
public static string ToJson(this ICollection items, bool formatted = false, char formatChar = '\t', int maxDepth = JsonWriter.MAX_DEPTH, bool ignoreDirectionRestrictions = false, Propex targets = null) { JsonWriterOptions options = new JsonWriterOptions(maxDepth, formatChar, formatted, ignoreDirectionRestrictions, targets); return items.ToJson(options); }
public Property(string name, bool isOptional, Propex subProperties) { Name = name; IsOptional = isOptional; SubProperties = subProperties; }
protected ResponseAction Respond(HttpStatusCode status, IJsonObject jsonObject, Propex targets) { var options = new JsonWriterOptions(targets: targets, formatted: Formatted); return Respond(status, (IJsonItemWriter)jsonObject, options); }
protected ResponseAction OK(System.Collections.ICollection models, Propex targets) { JsonWriterOptions options = new JsonWriterOptions(targets: targets, formatted: Formatted); return OK(models, options); }
protected ResponseAction OK(IJsonItemWriter itemWriter, Propex targets = null) { return Respond(HttpStatusCode.OK, itemWriter, targets); }
protected ResponseAction OK(IJsonObject jsonObject, Propex targets = null) { return Respond(HttpStatusCode.OK, jsonObject, targets ?? Targets); }
protected ResponseAction Created(IJsonObject jsonObject, Propex targets) { return Respond(HttpStatusCode.Created, jsonObject, targets); }