| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace GreenTree.Nachtragsmanagement.Core
- {
- /// <summary>
- /// Represents a common helper
- /// </summary>
- public partial interface IWebHelper
- {
- /// <summary>
- /// Get URL referrer
- /// </summary>
- /// <returns>URL referrer</returns>
- string GetUrlReferrer();
- /// <summary>
- /// Get context IP address
- /// </summary>
- /// <returns>URL referrer</returns>
- string GetCurrentIpAddress();
- /// <summary>
- /// Gets a value indicating whether current connection is secured
- /// </summary>
- /// <returns>true - secured, false - not secured</returns>
- bool IsCurrentConnectionSecured();
- /// <summary>
- /// Gets server variable by name
- /// </summary>
- /// <param name="name">Name</param>
- /// <returns>Server variable</returns>
- string ServerVariables(string name);
- /// <summary>
- /// Maps a virtual path to a physical disk path.
- /// </summary>
- /// <param name="path">The path to map. E.g. "~/bin"</param>
- /// <returns>The physical path. E.g. "c:\inetpub\wwwroot\bin"</returns>
- string MapPath(string path);
- /// <summary>
- /// Modifies query string
- /// </summary>
- /// <param name="url">Url to modify</param>
- /// <param name="queryStringModification">Query string modification</param>
- /// <param name="anchor">Anchor</param>
- /// <returns>New url</returns>
- string ModifyQueryString(string url, string queryStringModification, string anchor);
- /// <summary>
- /// Remove query string from url
- /// </summary>
- /// <param name="url">Url to modify</param>
- /// <param name="queryString">Query string to remove</param>
- /// <returns>New url</returns>
- string RemoveQueryString(string url, string queryString);
- /// <summary>
- /// Gets query string value by name
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="name">Parameter name</param>
- /// <returns>Query string value</returns>
- T QueryString<T>(string name);
- /// <summary>
- /// Restart application domain
- /// </summary>
- /// <param name="makeRedirect">A value indicating whether we should made redirection after restart</param>
- /// <param name="redirectUrl">Redirect URL; empty string if you want to redirect to the current page URL</param>
- void RestartAppDomain(bool makeRedirect = false, string redirectUrl = "");
- /// <summary>
- /// Gets a value that indicates whether the client is being redirected to a new location
- /// </summary>
- bool IsRequestBeingRedirected { get; }
- /// <summary>
- /// Gets or sets a value that indicates whether the client is being redirected to a new location using POST
- /// </summary>
- bool IsPostBeingDone { get; set; }
- }
- }
|