using System.Web; namespace PalGain.Core { /// /// Represents a common helper /// public partial interface IWebHelper { /// /// Get URL referrer /// /// URL referrer string GetUrlReferrer(); /// /// Get context IP address /// /// URL referrer string GetCurrentIpAddress(); /// /// Gets this page name /// /// Value indicating whether to include query strings /// Page name string GetThisPageUrl(bool includeQueryString); /// /// Gets this page name /// /// Value indicating whether to include query strings /// Value indicating whether to get SSL protected page /// Page name string GetThisPageUrl(bool includeQueryString, bool useSsl); /// /// Gets a value indicating whether current connection is secured /// /// true - secured, false - not secured bool IsCurrentConnectionSecured(); /// /// Gets server variable by name /// /// Name /// Server variable string ServerVariables(string name); /// /// Gets store host location /// /// Use SSL /// Store host location string GetStoreHost(bool useSsl); /// /// Gets store location /// /// Store location string GetStoreLocation(); /// /// Gets store location /// /// Use SSL /// Store location string GetStoreLocation(bool useSsl); /// /// Returns true if the requested resource is one of the typical resources that needn't be processed by the cms engine. /// /// HTTP Request /// True if the request targets a static resource file. /// /// These are the file extensions considered to be static resources: /// .css /// .gif /// .png /// .jpg /// .jpeg /// .js /// .axd /// .ashx /// bool IsStaticResource(HttpRequest request); /// /// Maps a virtual path to a physical disk path. /// /// The path to map. E.g. "~/bin" /// The physical path. E.g. "c:\inetpub\wwwroot\bin" string MapPath(string path); /// /// Modifies query string /// /// Url to modify /// Query string modification /// Anchor /// New url string ModifyQueryString(string url, string queryStringModification, string anchor); /// /// Remove query string from url /// /// Url to modify /// Query string to remove /// New url string RemoveQueryString(string url, string queryString); /// /// Gets query string value by name /// /// /// Parameter name /// Query string value T QueryString(string name); /// /// Restart application domain /// /// A value indicating whether we should made redirection after restart /// Redirect URL; empty string if you want to redirect to the current page URL void RestartAppDomain(bool makeRedirect = false, string redirectUrl = ""); /// /// Gets a value that indicates whether the client is being redirected to a new location /// bool IsRequestBeingRedirected { get; } /// /// Gets or sets a value that indicates whether the client is being redirected to a new location using POST /// bool IsPostBeingDone { get; set; } } }