IList <NodeRule <MessageInfo, DefaultLinkStyle> > IGraphvizTheme <DefaultLinkStyle> .DefaultNodeRules() { return(new List <NodeRule <MessageInfo, DefaultLinkStyle> >() { ThemeNodeRules.SetComments, ThemeNodeRules.SetLabel, TTLAttribute.GetRule(), ServiceNameAttribute.GetRule(), TagsAttribute.GetRule(), TagsAltAttribute.GetRule(), LabelAltAttribute.GetRule(), }); }
public async Task IApiActionAttributeTest() { var context = new TestActionContext( httpApi: null, httpApiConfig: new HttpApiConfig { HttpHost = new Uri("http://www.mywebapi.com") }, apiActionDescriptor: new ApiActionDescriptor(typeof(IMyApi).GetMethod("PostAsync"))); var attr = new TagsAttribute("key", "laojiu"); await attr.BeforeRequestAsync(context); Assert.Equal("laojiu", context.Tags.Get("key").As <string>()); }
public async Task IApiActionAttributeTest() { var context = new ApiActionContext { RequestMessage = new HttpApiRequestMessage { RequestUri = new Uri("http://www.mywebapi.com"), Method = HttpMethod.Post }, ApiActionDescriptor = ApiDescriptorCache.GetApiActionDescriptor(typeof(IMyApi).GetMethod("PostAsync")) }; var attr = new TagsAttribute("key", "laojiu"); await attr.BeforeRequestAsync(context); Assert.Equal("laojiu", context.Tags.Get("key").As <string>()); }