Exemple #1
0
        public string ResolveApplicationName(IHttpContext context)
        {
            string fromHeader = context?.Request?.Headers[CustomHeaders.ApplicationName];

            if (string.IsNullOrEmpty(fromHeader))
            {
                string domainName = context?.Request?.Url?.Host;
                if (!string.IsNullOrEmpty(domainName))
                {
                    HostDomain hostDomain = ApplicationRegistrationRepository.OneHostDomainWhere(d => d.DomainName == domainName);
                    if (hostDomain != null)
                    {
                        return(hostDomain.DefaultApplicationName);
                    }
                }
            }
            return(fromHeader.Or(Bam.Net.CoreServices.ApplicationRegistration.Data.Application.Unknown.Name));
        }
 public object GetValue(string key)
 {
     return(HostDomain.GetData(key));
 }
        //private Dictionary<string, object> _extendProperties = new Dictionary<string, object>();

        public void SetValue(string key, object value)
        {
            HostDomain.SetData(key, value);
        }