public NetHttpChannelManager(WADLUtility.Url baseUrl) { BaseUrl = baseUrl; rss = String.Empty; wadl = WADLUtility.GenerateWadl(this.GetType(), BaseUrl); WADLApplication application = WADLApplication.GetWADLApplication(this.GetType()); ChannelUrl = WADLUtility.Url.CreateUrl(baseUrl, application.Name); InnerChannels = new List <NetHttpChannelManager>(); }
public NetHttpChannelManager CreateChannelManager(WADLUtility.Url baseUrl, NetHttpChannelManager parent) { NetHttpChannelManager channel = (NetHttpChannelManager)Activator.CreateInstance(System.Type.GetType(this.Type), new object[] { baseUrl }); channel.Parent = parent; foreach (TemplateConfigurationElement template in Templates) { channel.InnerChannels.Add(template.CreateChannelManager(channel.ChannelUrl, channel)); } return(channel); }
private List <NetHttpChannelDispatcher> GetTemplates(List <NetHttpChannelDispatcher> templates) { InnerChannels.ForEach(delegate(NetHttpChannelManager manager) { manager.GetTemplates(templates); }); WADLMethod[] methods = GetWADLMethods(); XDocument wadl = XDocument.Parse(Wadl()); var resources = wadl.Descendants(XName.Get("resource", CONSTANTS.Namespace)).ToArray <XElement>(); int index = 0; Array.ForEach <WADLMethod>(methods, delegate(WADLMethod method) { WADLUtility.Url url = WADLUtility.Url.CreateUrl(resources[index].Parent.Attribute("base").Value, resources[index].Attribute("path").Value); NetHttpChannelDispatcher dispatcher = new NetHttpChannelDispatcher(this, method, new NetHttpUriTemplate(url, true)); templates.Add(dispatcher); index++; }); return(templates); }
public NetHttpUriTemplate(WADLUtility.Url url, bool ignoreTrailingSlash) : base(url.PathAndQuery, ignoreTrailingSlash) { this.url = url; }
public NetHttpService(WADLUtility.Url baseUrl) : base(baseUrl) //: base(WADL.WADLUtility.Url.CreateUrl(baseUrl)) { }
public NetHttpUriTemplate(WADLUtility.Url url) : this(url, true) { }