Esempio n. 1
0
        private string RequestBody_Data(DocumentorContext context, params object[] parameters)
        {
            MethodInfo restMethod            = parameters[0] as MethodInfo;
            RequestBodyExampleAttribute attr = restMethod.GetRadishAttribute <RequestBodyExampleAttribute>();

            return(attr != null ? attr.Data : "");
        }
Esempio n. 2
0
        private string RequestBody_DataFormat(DocumentorContext context, params object[] parameters)
        {
            MethodInfo restMethod            = parameters[0] as MethodInfo;
            RequestBodyExampleAttribute attr = restMethod.GetRadishAttribute <RequestBodyExampleAttribute>();

            return(attr.Format.ToString());
        }
Esempio n. 3
0
        private string Method_RequestBodyExample(DocumentorContext context, object[] parameters)
        {
            MethodInfo restMethod            = parameters[0] as MethodInfo;
            RequestBodyExampleAttribute attr = restMethod.GetRadishAttribute <RequestBodyExampleAttribute>();

            return(attr != null ? context.RenderTemplate <BasicTemplateSet>(ts => ts.RequestBodyExample, restMethod) : "");
        }