コード例 #1
0
		public void GetSet ()
		{
			WsdlHelpGeneratorElement el = new WsdlHelpGeneratorElement ();

			el.Href="http://www.ximian.com/";
			Assert.AreEqual ("http://www.ximian.com/", el.Href, "A1");
		}
コード例 #2
0
        protected override void Reset(ConfigurationElement parentElement)
        {
            WsdlHelpGeneratorElement element = (WsdlHelpGeneratorElement)parentElement;
            WebContext hostingContext        = base.EvaluationContext.HostingContext as WebContext;

            if (hostingContext != null)
            {
                string path = hostingContext.Path;
                bool   flag = path == null;
                this.actualPath = element.actualPath;
                if (flag)
                {
                    path = HostingEnvironment.ApplicationVirtualPath;
                }
                if ((path != null) && !path.EndsWith("/", StringComparison.Ordinal))
                {
                    path = path + "/";
                }
                if ((path == null) && (parentElement != null))
                {
                    this.virtualPath = element.virtualPath;
                }
                else if (path != null)
                {
                    this.virtualPath = path;
                }
            }
            base.Reset(parentElement);
        }
コード例 #3
0
        protected override void Reset(ConfigurationElement parentElement)
        {
            PartialTrustHelpers.FailIfInPartialTrustOutsideAspNet();

            WsdlHelpGeneratorElement parent = (WsdlHelpGeneratorElement)parentElement;

#if MONO_BROKEN_CONFIGURATION_DLL
            try {
                var hack = this.EvaluationContext;
            } catch (ConfigurationErrorsException) {
                base.Reset(parentElement);
                this.actualPath = GetConfigurationDirectory();
                return;
            }
#endif
            ContextInformation context    = this.EvaluationContext;
            WebContext         webContext = context.HostingContext as WebContext;
            if (webContext != null)
            {
                string tempVirtualPath = webContext.Path;
                bool   isMachineConfig = tempVirtualPath == null;
                this.actualPath = parent.actualPath;

                if (isMachineConfig)
                {
                    tempVirtualPath = HostingEnvironment.ApplicationVirtualPath;
                }

                if ((tempVirtualPath != null) && !tempVirtualPath.EndsWith("/", StringComparison.Ordinal))
                {
                    tempVirtualPath += "/";
                }

                if ((tempVirtualPath == null) && (parentElement != null))
                {
                    this.virtualPath = parent.virtualPath;
                }
                else if (tempVirtualPath != null)
                {
                    this.virtualPath = tempVirtualPath;
                }
            }

            base.Reset(parentElement);
        }
コード例 #4
0
        protected override void Reset(ConfigurationElement parentElement)
        {
            PartialTrustHelpers.FailIfInPartialTrustOutsideAspNet();

            WsdlHelpGeneratorElement parent  = (WsdlHelpGeneratorElement)parentElement;
            ContextInformation       context = this.EvaluationContext;
            WebContext webContext            = context.HostingContext as WebContext;

            if (webContext != null)
            {
                string tempVirtualPath = webContext.Path;
                bool   isMachineConfig = tempVirtualPath == null;
                this.actualPath = parent.actualPath;

                if (isMachineConfig)
                {
                    tempVirtualPath = HostingEnvironment.ApplicationVirtualPath;
                }

                if ((tempVirtualPath != null) && !tempVirtualPath.EndsWith("/", StringComparison.Ordinal))
                {
                    tempVirtualPath += "/";
                }

                if ((tempVirtualPath == null) && (parentElement != null))
                {
                    this.virtualPath = parent.virtualPath;
                }
                else if (tempVirtualPath != null)
                {
                    this.virtualPath = tempVirtualPath;
                }
            }

            base.Reset(parentElement);
        }
コード例 #5
0
		public void Ctors ()
		{
			WsdlHelpGeneratorElement el = new WsdlHelpGeneratorElement ();

			Assert.IsNull (el.Href, "A1");
		}