コード例 #1
0
        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 : "");
        }
コード例 #2
0
        private string ResponseBody_DataFormat(DocumentorContext context, params object[] parameters)
        {
            MethodInfo restMethod             = parameters[0] as MethodInfo;
            ResponseBodyExampleAttribute attr = restMethod.GetRadishAttribute <ResponseBodyExampleAttribute>();

            return(attr.Format.ToString());
        }
コード例 #3
0
        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) : "");
        }