コード例 #1
0
ファイル: SeoHelper.cs プロジェクト: rickeygalloway/Test
        public string BuildSeoSchemaField(ServiceOrgUnitDto location)
        {
            var sb = new StringBuilder();

            sb.Append("<div class='SeoSchema' itemscope itemtype='http://schema.org/MedicalOrganization'>");

            //Name
            sb.AppendFormat("<meta itemprop='name' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.Name));

            //Address
            sb.Append("<div itemprop='address' itemscope itemtype='http://schema.org/PostalAddress'>");
            sb.AppendFormat("<meta itemprop='streetAddress' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.Address1));
            sb.AppendFormat("<meta itemprop='addressLocality' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.City));
            sb.AppendFormat("<meta itemprop='addressRegion' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.State));
            sb.AppendFormat("<meta itemprop='postalCode' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.Zip));
            sb.Append("</div>");

            //Phone
            sb.AppendFormat("<meta itemprop='telephone' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.PhoneNumber));

            sb.Append("</div>");

            return sb.ToString();
        }
コード例 #2
0
 public static int ComparebyDistance(ServiceOrgUnitDto dto1, ServiceOrgUnitDto dto2)
 {
     return dto1.Distance.CompareTo(dto2.Distance);
 }