public static string BuildUrl(IServiceProvider serviceProvider, Control owner, string initialUrl, string caption, string filter, UrlBuilderOptions options) { string baseUrl = string.Empty; string str2 = null; IDesignerHost host = (IDesignerHost)serviceProvider.GetService(typeof(IDesignerHost)); if (host != null) { WebFormsRootDesigner designer = host.GetDesigner(host.RootComponent) as WebFormsRootDesigner; if (designer != null) { baseUrl = designer.DocumentUrl; } } if (baseUrl.Length == 0) { IWebFormsDocumentService service = (IWebFormsDocumentService)serviceProvider.GetService(typeof(IWebFormsDocumentService)); if (service != null) { baseUrl = service.DocumentUrl; } } IWebFormsBuilderUIService service2 = (IWebFormsBuilderUIService)serviceProvider.GetService(typeof(IWebFormsBuilderUIService)); if (service2 != null) { str2 = service2.BuildUrl(owner, initialUrl, baseUrl, caption, filter, options); } return(str2); }
string IUrlResolutionService.ResolveClientUrl(string relativeUrl) { if (relativeUrl == null) { throw new ArgumentNullException("relativeUrl"); } if (!WebFormsRootDesigner.IsAppRelativePath(relativeUrl)) { return(relativeUrl); } string documentUrl = this._owner.DocumentUrl; if (((documentUrl == null) || (documentUrl.Length == 0)) || !WebFormsRootDesigner.IsAppRelativePath(documentUrl)) { return(relativeUrl.Substring(2)); } Uri uri = new Uri(documentUrl.Replace("~", "file://foo"), true); relativeUrl = relativeUrl.Replace("~", "file://foo"); Uri uri2 = new Uri(relativeUrl, true); return(uri.MakeRelativeUri(uri2).ToString().Replace("file://foo", string.Empty)); }
public UrlResolutionService(WebFormsRootDesigner owner) { this._owner = owner; }
public ImplicitResourceProvider(WebFormsRootDesigner owner) { this._owner = owner; }
public DummyRootDesigner(WebFormsRootDesigner rootDesigner, IDictionary<string, string> userControlRegisterEntries, IList<UserControlDesigner.TagNamespaceRegisterEntry> tagNamespaceRegisterEntries, string documentUrl) { this._rootDesigner = rootDesigner; this._userControlRegisterEntries = userControlRegisterEntries; this._tagNamespaceRegisterEntries = tagNamespaceRegisterEntries; this._documentUrl = documentUrl; }
public UrlResolutionService(WebFormsRootDesigner owner) { this._owner = owner; }
public ImplicitResourceProvider(WebFormsRootDesigner owner) { this._owner = owner; }