diff --git a/Basic/Types/BasicCity.cs b/Basic/Types/BasicCity.cs index c89dd207..5bbb9d91 100644 --- a/Basic/Types/BasicCity.cs +++ b/Basic/Types/BasicCity.cs @@ -5,6 +5,7 @@ using Activizr.Basic.Interfaces; namespace Activizr.Basic.Types { + [Serializable] public class BasicCity : IHasIdentity { public BasicCity (int cityId, string name, int countryId, int geographyId) @@ -20,6 +21,12 @@ namespace Activizr.Basic.Types { } + [Obsolete ("Do not call this ctor directly. It exists to enable serialization.", true)] + public BasicCity() + { + // this ctor should never be called from code + } + private int cityId; private string name; private int countryId; diff --git a/Basic/Types/BasicCountry.cs b/Basic/Types/BasicCountry.cs index 606235cb..b9b23a69 100644 --- a/Basic/Types/BasicCountry.cs +++ b/Basic/Types/BasicCountry.cs @@ -33,6 +33,12 @@ namespace Activizr.Basic.Types { } + [Obsolete ("Do not call this function directly. It exists to enable serialization.", true)] + public BasicCountry() + { + // this does not initialize the Basic Country, but exists to enable serialization. + } + public int CountryId { get { return countryId; } diff --git a/Basic/Types/BasicPostalCode.cs b/Basic/Types/BasicPostalCode.cs index bfaf4e80..74f08395 100644 --- a/Basic/Types/BasicPostalCode.cs +++ b/Basic/Types/BasicPostalCode.cs @@ -19,6 +19,12 @@ namespace Activizr.Basic.Types { } + [Obsolete ("Do not call this ctor directly. It exists to enable serialization.", true)] + public BasicPostalCode() + { + // this should never be called from code + } + public string PostalCode { get; private set; } // any whitespace removed public string CityName { get; protected set; } public string CountryCode { get; protected set; }