Exemplo 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 : "");
        }
Exemplo 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());
        }
Exemplo 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) : "");
        }