Added public ctors (that can't be called compile-time) for City, Country, PostalCode, for serializability
This commit is contained in:
@@ -12,6 +12,13 @@ namespace Activizr.Logic.Structure
|
||||
{
|
||||
}
|
||||
|
||||
// public ctor needed for serialization
|
||||
[Obsolete ("Do not call this function directly. It is intended only for use in serialization.", true)]
|
||||
public City(): base (0, string.Empty, 0, 0)
|
||||
{
|
||||
// this instance is NOT initalized, and intended to be used only in serialization.
|
||||
}
|
||||
|
||||
|
||||
public Geography Geography
|
||||
{
|
||||
|
||||
@@ -13,6 +13,12 @@ namespace Activizr.Logic.Structure
|
||||
{
|
||||
}
|
||||
|
||||
[Obsolete ("Do not call this function directly. It is only intended for use in serialization.", true)]
|
||||
public Country(): base (0, string.Empty, string.Empty)
|
||||
{
|
||||
// this ctor does NOT initialize the instance, but is provided to allow for serialization
|
||||
}
|
||||
|
||||
public static Country FromBasic (BasicCountry basic)
|
||||
{
|
||||
return new Country(basic);
|
||||
|
||||
@@ -9,12 +9,18 @@ namespace Activizr.Logic.Structure
|
||||
[Serializable]
|
||||
public class PostalCode: BasicPostalCode
|
||||
{
|
||||
public PostalCode (BasicPostalCode basic):
|
||||
private PostalCode (BasicPostalCode basic):
|
||||
base (basic)
|
||||
{
|
||||
// constructor
|
||||
}
|
||||
|
||||
[Obsolete ("Do not call this constructor directly. It is intended only for serialization.", true)]
|
||||
public PostalCode(): base (string.Empty, string.Empty, string.Empty)
|
||||
{
|
||||
// this ctor does NOT initialize the instance. It is provided to allow for serialization.
|
||||
}
|
||||
|
||||
static public PostalCode FromBasic (BasicPostalCode basic)
|
||||
{
|
||||
return new PostalCode(basic);
|
||||
|
||||
Reference in New Issue
Block a user