/// <summary> /// Determeins if this TEL is equal to another TEL /// </summary> public bool Equals(TEL other) { bool result = false; if (other != null) { result = base.Equals((PDV <String>)other) && (other.Use != null ? other.Use.Equals(this.Use) : this.Use == null) && (other.UseablePeriod != null ? other.UseablePeriod.Equals(this.UseablePeriod) : this.UseablePeriod == null) && (other.Capabilities != null ? other.Capabilities.Equals(this.Capabilities) : this.Capabilities == null); } return(result); }
public static bool IsValidUrlFlavor(TEL tel) { // Nothing to validate if (tel.Value == null) { return(true); } string[] allowedSchemes = new string[] { "#", "file:", "nfs://", "ftp://", "cid://", "http://", "https://" }; bool valid = tel.Use == null; foreach (string s in allowedSchemes) { if (((string)tel).StartsWith(s, StringComparison.InvariantCulture)) { return(valid); } } return(false); }
public static bool IsValidEMailFlavor(TEL tel) { return(tel.Value != null && tel.Value.StartsWith("mailto:")); }
public static bool IsValidPersonFlavor(TEL tel) { return(IsValidPhoneFlavor(tel) || IsValidEMailFlavor(tel)); }
public static bool IsValidUriFlavor(TEL tel) { return(IsValidUrlFlavor(tel)); }
/// <summary> /// Create an instance of ED that links to a real location <paramref name="reference"/> /// </summary> /// <param name="reference">The reference to the real data</param> public ED(TEL reference) : this() { this.Reference = reference; }