Beispiel #1
0
 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;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 // 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);
 }
Beispiel #5
0
 public Property(string name, bool isOptional, Propex subProperties)
 {
     Name = name;
     IsOptional = isOptional;
     SubProperties = subProperties;
 }
Beispiel #6
0
 protected ResponseAction Respond(HttpStatusCode status, IJsonObject jsonObject, Propex targets)
 {
     var options = new JsonWriterOptions(targets: targets, formatted: Formatted);
     return Respond(status, (IJsonItemWriter)jsonObject, options);
 }
Beispiel #7
0
 protected ResponseAction OK(System.Collections.ICollection models, Propex targets)
 {
     JsonWriterOptions options = new JsonWriterOptions(targets: targets, formatted: Formatted);
     return OK(models, options);
 }
Beispiel #8
0
 protected ResponseAction OK(IJsonItemWriter itemWriter, Propex targets = null)
 {
     return Respond(HttpStatusCode.OK, itemWriter, targets);
 }
Beispiel #9
0
 protected ResponseAction OK(IJsonObject jsonObject, Propex targets = null)
 {
     return Respond(HttpStatusCode.OK, jsonObject, targets ?? Targets);
 }
Beispiel #10
0
 protected ResponseAction Created(IJsonObject jsonObject, Propex targets)
 {
     return Respond(HttpStatusCode.Created, jsonObject, targets);
 }