Exemplo n.º 1
0
        protected override void DeserializeSection(XmlReader reader)
        {
            base.DeserializeSection(reader);
            WebContext hostingContext = base.EvaluationContext.HostingContext as WebContext;

            if (hostingContext != null)
            {
                this._virtualPath = VirtualPath.CreateNonRelativeTrailingSlashAllowNull(hostingContext.Path);
            }
        }
        protected override void DeserializeSection(XmlReader reader)
        {
            WebContext context;

            base.DeserializeSection(reader);

            // Determine hosting context
            context = EvaluationContext.HostingContext as WebContext;

            if (context != null)
            {
                // Make sure it has a trailing slash as it is used as a base path to Combine with relative
                _virtualPath = VirtualPath.CreateNonRelativeTrailingSlashAllowNull(context.Path);
            }
        }