コード例 #1
0
        public async Task <ISiteHost> GetSiteHost(string hostName)
        {
            using (DbDataReader reader = dbSiteSettings.GetHost(hostName))
            {
                while (reader.Read())
                {
                    SiteHost host = new SiteHost();
                    host.LoadFromReader(reader);
                    return(host);
                }
            }

            return(null);
        }
コード例 #2
0
        public async Task <ISiteHost> GetSiteHost(string hostName, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            using (DbDataReader reader = dbSiteSettings.GetHost(hostName))
            {
                while (reader.Read())
                {
                    SiteHost host = new SiteHost();
                    host.LoadFromReader(reader);
                    return(host);
                }
            }

            return(null);
        }