public override int GetHashCode() { unchecked { var hashCode = (DownloadPath != null ? DownloadPath.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (WebSiteUrl != null ? WebSiteUrl.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (KeePassEntryUuid != null ? KeePassEntryUuid.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AdditionalKeePassFields != null ? AdditionalKeePassFields.GetHashCode() : 0); return(hashCode); } }
public object Clone() { Channel channel = new Channel(); channel.Title = (string)(Title.Clone()); if (PlayUrl != null) { channel.PlayUrl = new Uri(PlayUrl.ToString()); } else { channel.PlayUrl = null; } if (WebSiteUrl != null) { channel.WebSiteUrl = new Uri(WebSiteUrl.ToString()); } else { channel.WebSiteUrl = null; } if (Description != null) { channel.Description = (string)(Description.Clone()); } channel.Date = Date; if (Category != null) { channel.Category = (string)(Category.Clone()); } if (Author != null) { channel.Author = (string)(Author.Clone()); } if (Length != null) { channel.Length = (string)(Length.Clone()); } if (Type != null) { channel.Type = (string)(Type.Clone()); } return(channel); }
public object Clone() { Channel channel = new Channel(); channel.Title = (string)Title.Clone(); if (this.PlayUrl != null) { channel.PlayUrl = new Uri(PlayUrl.ToString()); } else { channel.PlayUrl = null; } if (this.WebSiteUrl != null) { channel.WebSiteUrl = new Uri(WebSiteUrl.ToString()); } else { channel.WebSiteUrl = null; } if (this.Description != null) { channel.Description = (string)Description.Clone(); } if (this.Category != null) { channel.Category = (string)Category.Clone(); } channel.Listener = Listener; channel.Bitrate = Bitrate; if (this.Length != null) { channel.Length = (string)Length.Clone(); } if (this.Type != null) { channel.Type = (string)Type.Clone(); } return(channel); }
/// <summary> /// Allows you to compare another address object to determine if the two addresses are the same. /// </summary> /// <param name="a2">Another address object.</param> /// <returns>If true, the current address matches the address in the parameter.</returns> public bool IsEqualTo(Address a2) { if (a2 == null) { return(false); } var result = true; if (string.Compare(NickName.Trim(), a2.NickName.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(FirstName.Trim(), a2.FirstName.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(MiddleInitial.Trim(), a2.MiddleInitial.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(LastName.Trim(), a2.LastName.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(Company.Trim(), a2.Company.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(Line1.Trim(), a2.Line1.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(Line2.Trim(), a2.Line2.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(Line3.Trim(), a2.Line3.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(RegionBvin.Trim(), a2.RegionBvin.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(City.Trim(), a2.City.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(PostalCode.Trim(), a2.PostalCode.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(CountryBvin.Trim(), a2.CountryBvin.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(Phone.Trim(), a2.Phone.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(Fax.Trim(), a2.Fax.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } if (string.Compare(WebSiteUrl.Trim(), a2.WebSiteUrl.Trim(), true, CultureInfo.InvariantCulture) != 0) { result = false; } //if (this.Residential != a2.Residential) { // result = false; //} return(result); }
public string ToHtmlString() { StringBuilder sb = new StringBuilder(); if (NickName.Trim().Length > 0) { sb.Append("<em>" + NickName + "</em><br />"); } if (LastName.Length > 0 || FirstName.Length > 0) { sb.Append(FirstName); if (MiddleInitial.Trim().Length > 0) { sb.Append(" " + MiddleInitial); } sb.Append(" " + LastName + "<br />"); if (Company.Trim().Length > 0) { sb.Append(Company + "<br />"); } } if (Line1.Length > 0) { sb.Append(Line1 + "<br />"); } if (Line2.Trim().Length > 0) { sb.Append(Line2 + "<br />"); } if (Line3.Trim().Length > 0) { sb.Append(Line3 + "<br />"); } MerchantTribe.Web.Geography.Country c = MerchantTribe.Web.Geography.Country.FindByBvin(CountryBvin); MerchantTribe.Web.Geography.Region r = c.Regions.Where(y => y.Abbreviation == RegionBvin).FirstOrDefault(); if (r != null) { sb.Append(City + ", " + r.Abbreviation + " " + _PostalCode + "<br />"); } else { if (RegionName.Trim().Length > 0) { sb.Append(City + ", " + RegionName + " " + _PostalCode + "<br />"); } else { sb.Append(City + ", " + _PostalCode + "<br />"); } } if (c != null) { sb.Append(c.DisplayName + "<br />"); } if (Phone.Trim().Length > 0) { sb.Append(Phone + "<br />"); } if (Fax.Trim().Length > 0) { sb.Append("Fax: " + Fax + "<br />"); } if (WebSiteUrl.Trim().Length > 0) { sb.Append(WebSiteUrl + "<br />"); } return(sb.ToString()); }