private string ResponseBody_Data(DocumentorContext context, params object[] parameters) { MethodInfo restMethod = parameters[0] as MethodInfo; ResponseBodyExampleAttribute attr = restMethod.GetRadishAttribute <ResponseBodyExampleAttribute>(); return(attr != null ? attr.Data : ""); }
private string ResponseBody_DataFormat(DocumentorContext context, params object[] parameters) { MethodInfo restMethod = parameters[0] as MethodInfo; ResponseBodyExampleAttribute attr = restMethod.GetRadishAttribute <ResponseBodyExampleAttribute>(); return(attr.Format.ToString()); }
private string Method_ResponseBodyExample(DocumentorContext context, params object[] parameters) { MethodInfo restMethod = parameters[0] as MethodInfo; ResponseBodyExampleAttribute attr = restMethod.GetRadishAttribute <ResponseBodyExampleAttribute>(); return(attr != null ? context.RenderTemplate <BasicTemplateSet>(ts => ts.ResponseBodyExample, restMethod) : ""); }