Esempio n. 1
0
 private bool Equals(SiteBindings other)
 {
     return(string.Equals(Protocol, other.Protocol) &&
            string.Equals(Domain, other.Domain) &&
            Port == other.Port &&
            string.Equals(Application, other.Application));
 }
Esempio n. 2
0
        //search 2 times, with Application name and without.
        //should help if resource of site in deep deep folder
        //or Segment2 really contain it's resource name
        private bool SiteNameSearch(Message m, out string siteName)
        {
            var bindMapper = GetMapBindToSiteName();
            var bind       = new SiteBindings
            {
                Domain      = m.Domain,
                Port        = m.Port,
                Protocol    = m.Scheme,
                Application = m.Segment2,
            };

            if (bindMapper.TryGetValue(bind, out siteName))
            {
                return(true);
            }
            bind.Application = string.Empty;
            return(bindMapper.TryGetValue(bind, out siteName));
        }