Added default ctors to more classes

This commit is contained in:
Rick Falkvinge
2012-11-05 12:02:10 +00:00
parent 01d797cf33
commit 6af0345ebc
3 changed files with 19 additions and 0 deletions
+7
View File
@@ -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;
+6
View File
@@ -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; }
+6
View File
@@ -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; }