|
using System;
using WebSoft;
namespace WebSoft
{
/// <summary>
/// The Address class serves as a demonstration general purpose class that
/// uses an instance of PropertBag to enable the client to add ad-hoc
/// property values
/// </summary>
[Serializable()]
public class Address
{
/// An instance of the PropertyBag class
private PropertyBag objPropertyBag;
/// fields for the general purpose classes in-built
/// properties
private string strLine1;
private string strLine2;
private string strLine3;
private string strCity;
private string strCounty;
private string strCountry;
private string strPostCode;
/// <summary>
/// Default Constructor
/// </summary>
public Address()
{
/// The PropertyBag instance is initialized; this is all
/// a user of the PropertyBag class has to remember to do
this.objPropertyBag = new PropertyBag(this);
}
/// <summary>
/// The first line of the address
/// </summary>
public string Line1
{
get
{
return this.strLine1;
}
set
{
this.strLine1 = value;
}
}
/// <summary>
/// The second line of the address
/// </summary>
public string Line2
{
get
{
return this.strLine2;
}
set
{
this.strLine2 = value;
}
}
/// <summary>
/// The third line of the address
/// </summary>
public string Line3
{
get
{
return this.strLine3;
}
set
{
this.strLine3 = value;
}
}
/// <summary>
/// The city part of the address
/// </summary>
public string City
{
get
{
return this.strCity;
}
set
{
this.strCity = value;
}
}
/// <summary>
/// The county part of the address
/// </summary>
public string County
{
get
{
return this.strCounty;
}
set
{
this.strCounty = value;
}
}
/// <summary>
/// The country part of the address
/// </summary>
public string Country
{
get
{
return this.strCountry;
}
set
{
this.strCountry = value;
}
}
/// <summary>
/// The post code part of the address
/// </summary>
public string PostCode
{
get
{
return this.strPostCode;
}
set
{
this.strPostCode = value;
}
}
/// <summary>
/// The Address objects PropertyBag instance
/// </summary>
public PropertyBag Properties
{
get
{
return this.objPropertyBag;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Graham works as a senior developer / software architect for
WebSoft Consultants Limited, devloping using a number of software technologies, concentrating on the C# / .NET technology set.
Areas of expertise include document management, n-tier enterprise business systems, and exploitation of workflow technology, as well as a wide range of development methodologies including agile model driven development, and UML.