/// <inheritdoc/> public string ToDelimitedString() { System.Globalization.CultureInfo culture = System.Globalization.CultureInfo.CurrentCulture; string separator = IsSubcomponent ? Configuration.SubcomponentSeparator : Configuration.ComponentSeparator; return(string.Format( culture, StringHelper.StringFormatSequence(0, 23, separator), StreetAddress?.ToDelimitedString(), OtherDesignation, City, StateOrProvince, ZipOrPostalCode, Country, AddressType, OtherGeographicDesignation, CountyParishCode?.ToDelimitedString(), CensusTract, AddressRepresentationCode, AddressValidityRange?.ToDelimitedString(), EffectiveDate.HasValue ? EffectiveDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, ExpirationDate.HasValue ? ExpirationDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, ExpirationReason?.ToDelimitedString(), TemporaryIndicator, BadAddressIndicator, AddressUsage, Addressee, Comment, PreferenceOrder.HasValue ? PreferenceOrder.Value.ToString(Consts.NumericFormat, culture) : null, ProtectionCode?.ToDelimitedString(), AddressIdentifier?.ToDelimitedString() ).TrimEnd(separator.ToCharArray())); }
/// <inheritdoc/> public string ToDelimitedString() { System.Globalization.CultureInfo culture = System.Globalization.CultureInfo.CurrentCulture; string separator = IsSubcomponent ? Configuration.SubcomponentSeparator : Configuration.ComponentSeparator; return(string.Format( culture, StringHelper.StringFormatSequence(0, 18, separator), TelephoneNumber, TelecommunicationUseCode, TelecommunicationEquipmentType, CommunicationAddress, CountryCode.HasValue ? CountryCode.Value.ToString(culture) : null, AreaCityCode.HasValue ? AreaCityCode.Value.ToString(culture) : null, LocalNumber.HasValue ? LocalNumber.Value.ToString(culture) : null, Extension.HasValue ? Extension.Value.ToString(culture) : null, AnyText, ExtensionPrefix, SpeedDialCode, UnformattedTelephoneNumber, EffectiveStartDate.HasValue ? EffectiveStartDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond) : null, ExpirationDate.HasValue ? ExpirationDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond) : null, ExpirationReason?.ToDelimitedString(), ProtectionCode?.ToDelimitedString(), SharedTelecommunicationIdentifier?.ToDelimitedString(), PreferenceOrder.HasValue ? PreferenceOrder.Value.ToString(Consts.NumericFormat, culture) : null ).TrimEnd(separator.ToCharArray())); }
private void DoNotifyDataExpired(TKeyType key, TDataType data, ExpirationReason reason) { EventHandler <ExpiredEventArgs <TKeyType, TDataType> > ev = DataExpired; if (null != ev) { if (!NotifyExpiredWithData) { data = default(TDataType); } ev(this, new ExpiredEventArgs <TKeyType, TDataType>(key, data, reason)); } }
public ExpiredEventArgs(KeyType key, DataType data, ExpirationReason reason) { _key = key; _data = data; _reason = reason; }