示例#1
0
        public static CatalogItemUrlBuilder CreateNonServerBuilder(string serverVirtualFolderUrl, string itemPath, bool alreadyEscaped, bool addItemPathAsQuery)
        {
            CatalogItemUrlBuilder catalogItemUrlBuilder = new CatalogItemUrlBuilder(RSPathUtil.Instance);

            catalogItemUrlBuilder.Construct(serverVirtualFolderUrl, itemPath, alreadyEscaped, addItemPathAsQuery, false);
            return(catalogItemUrlBuilder);
        }
示例#2
0
        public virtual string CombineUrl(string url, bool checkProtocol, NameValueCollection unparsedParameters, out ICatalogItemContext newContext)
        {
            newContext = this;
            string text = new CatalogItemUrlBuilder(this).ToString();

            if (url == null)
            {
                return(text);
            }
            if (string.Compare(url, text, StringComparison.Ordinal) == 0)
            {
                return(text);
            }
            newContext = this.Combine(url, checkProtocol, true);
            if (newContext == null)
            {
                newContext = null;
                return(url);
            }
            CatalogItemUrlBuilder catalogItemUrlBuilder = new CatalogItemUrlBuilder(newContext);

            if (unparsedParameters != null)
            {
                catalogItemUrlBuilder.AppendUnparsedParameters(unparsedParameters);
            }
            return(catalogItemUrlBuilder.ToString());
        }
示例#3
0
        public string GetImageUrl(bool useSessionId, string imageId, ICatalogItemContext ctx)
        {
            string text = null;

            if (this.m_renderingParameters != null)
            {
                text = this.m_renderingParameters["StreamRoot"];
            }
            if (text != null && text != string.Empty)
            {
                StringBuilder stringBuilder = new StringBuilder(text);
                if (imageId != null)
                {
                    stringBuilder.Append(imageId);
                }
                return(stringBuilder.ToString());
            }
            CatalogItemUrlBuilder catalogItemUrlBuilder = new CatalogItemUrlBuilder(ctx);
            string snapshotParamValue = this.SnapshotParamValue;

            if (snapshotParamValue != null)
            {
                catalogItemUrlBuilder.AppendCatalogParameter("Snapshot", snapshotParamValue);
            }
            string sessionIDParamValue = this.SessionIDParamValue;

            if (sessionIDParamValue != null)
            {
                catalogItemUrlBuilder.AppendCatalogParameter("SessionID", sessionIDParamValue);
            }
            else if (useSessionId && this.m_SessionId != null)
            {
                catalogItemUrlBuilder.AppendCatalogParameter("SessionID", this.m_SessionId);
            }
            string formatParamValue = this.FormatParamValue;

            if (formatParamValue != null)
            {
                catalogItemUrlBuilder.AppendCatalogParameter("Format", formatParamValue);
            }
            catalogItemUrlBuilder.AppendCatalogParameter("ImageID", imageId);
            return(catalogItemUrlBuilder.ToString());
        }
示例#4
0
 private void AppendOneParameter(string encodedPrefix, string name, string val, bool addNullSuffix)
 {
     this.m_urlString.Append('&');
     if (val != null)
     {
         this.m_urlString.Append(encodedPrefix);
         this.m_urlString.Append(CatalogItemUrlBuilder.EncodeUrlParameter(name));
         this.m_urlString.Append("=");
         this.m_urlString.Append(CatalogItemUrlBuilder.EncodeUrlParameter(val));
     }
     else
     {
         this.m_urlString.Append(encodedPrefix);
         this.m_urlString.Append(CatalogItemUrlBuilder.EncodeUrlParameter(name));
         if (addNullSuffix)
         {
             this.m_urlString.Append(CatalogItemUrlBuilder.EncodedParameterNullSuffix);
         }
         this.m_urlString.Append("=");
         this.m_urlString.Append(bool.TrueString);
     }
 }