Skip to content

Commit

Permalink
Updated namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekmansoft committed Nov 28, 2021
1 parent 78299c5 commit 886a16e
Show file tree
Hide file tree
Showing 26 changed files with 3,920 additions and 3,919 deletions.
204 changes: 102 additions & 102 deletions FamilyData/AddressClass.cs
Original file line number Diff line number Diff line change
@@ -1,102 +1,102 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace FamilyTreeLibrary.FamilyData
{
[DataContract]
public class AddressPartClass
{
public enum AddressPartType
{
//Unknown,

StreetAddress,
Line1,
Line2,
City,
PostCode,
//Place,
//Location,
State,
//County, // gedcom Geni.com
Country,

PhoneNumber,
//EmailAddress,
//WebAddress,

//Note
}
[DataMember]
private AddressPartType type;
[DataMember]
private String address;

public AddressPartClass(AddressPartType inType, String inAddress)
{
type = inType;
address = inAddress;

}
public override string ToString()
{
return address;
}
public AddressPartType GetAddressPartType()
{
return type;
}
}
[DataContract]
public class AddressClass
{
[DataMember]
private IList<AddressPartClass> addressList;

public AddressClass()
{
addressList = new List<AddressPartClass>();

}
public void AddAddressPart(AddressPartClass.AddressPartType inType, String inAddress)
{
AddressPartClass addressPart = new AddressPartClass(inType, inAddress);
addressList.Add(addressPart);

}
public void AddAddressPart(AddressPartClass inAddress)
{
addressList.Add(inAddress);

}
public IList<AddressPartClass> GetAddressPartList()
{
return addressList;
}
public AddressPartClass GetAddressPart(AddressPartClass.AddressPartType type)
{
if (addressList != null)
{
foreach (AddressPartClass addressPart in addressList)
{
if (addressPart.GetAddressPartType() == type)
{
return addressPart;
}
}
}
return null;
}
public override string ToString()
{
string tString = "";

foreach (AddressPartClass addressPart in addressList)
{
tString += " " + addressPart.ToString();
}
return tString;
}
}
}
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Ekmansoft.FamilyTree.Library.FamilyData
{
[DataContract]
public class AddressPartClass
{
public enum AddressPartType
{
//Unknown,

StreetAddress,
Line1,
Line2,
City,
PostCode,
//Place,
//Location,
State,
//County, // gedcom Geni.com
Country,

PhoneNumber,
//EmailAddress,
//WebAddress,

//Note
}
[DataMember]
private AddressPartType type;
[DataMember]
private String address;

public AddressPartClass(AddressPartType inType, String inAddress)
{
type = inType;
address = inAddress;

}
public override string ToString()
{
return address;
}
public AddressPartType GetAddressPartType()
{
return type;
}
}
[DataContract]
public class AddressClass
{
[DataMember]
private IList<AddressPartClass> addressList;

public AddressClass()
{
addressList = new List<AddressPartClass>();

}
public void AddAddressPart(AddressPartClass.AddressPartType inType, String inAddress)
{
AddressPartClass addressPart = new AddressPartClass(inType, inAddress);
addressList.Add(addressPart);

}
public void AddAddressPart(AddressPartClass inAddress)
{
addressList.Add(inAddress);

}
public IList<AddressPartClass> GetAddressPartList()
{
return addressList;
}
public AddressPartClass GetAddressPart(AddressPartClass.AddressPartType type)
{
if (addressList != null)
{
foreach (AddressPartClass addressPart in addressList)
{
if (addressPart.GetAddressPartType() == type)
{
return addressPart;
}
}
}
return null;
}
public override string ToString()
{
string tString = "";

foreach (AddressPartClass addressPart in addressList)
{
tString += " " + addressPart.ToString();
}
return tString;
}
}
}
130 changes: 65 additions & 65 deletions FamilyData/BaseXrefType.cs
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
using System;
//using System.Collections.Generic;
using System.Diagnostics;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;
using System.Runtime.Serialization;

namespace FamilyTreeLibrary.FamilyData
{
[DataContract]
public enum XrefType
{
Individual,
Family,
Multimedia,
Note,
Repository,
Source,
Submission,
Submitter
}
[DataContract]
public abstract class BaseXrefClass
{
private static TraceSource trace = new TraceSource("BaseXrefClass", SourceLevels.Warning);

[DataMember]
private XrefType type;
[DataMember]
private String xrefName;

public BaseXrefClass(XrefType type, string xref)
{
this.type = type;
xrefName = xref;
}

public String GetXrefName()
{
return xrefName;
}
public void SetXrefName(String name)
{
xrefName = name;
}
public void Print()
{
trace.TraceInformation("xref:" + type + ":[" + xrefName + "]");
}
public override int GetHashCode()
{
int hashCode = 0;
for (int i = 0; i < xrefName.Length; i++)
{
hashCode += (int)((xrefName[i] - '0') * (int)Math.Pow(10, (xrefName.Length - i - 1)));
}
return hashCode;
}
public override string ToString()
{
return type + ":" + xrefName;
}
}
}
using System;
//using System.Collections.Generic;
using System.Diagnostics;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;
using System.Runtime.Serialization;

namespace Ekmansoft.FamilyTree.Library.FamilyData
{
[DataContract]
public enum XrefType
{
Individual,
Family,
Multimedia,
Note,
Repository,
Source,
Submission,
Submitter
}
[DataContract]
public abstract class BaseXrefClass
{
private static TraceSource trace = new TraceSource("BaseXrefClass", SourceLevels.Warning);

[DataMember]
private XrefType type;
[DataMember]
private String xrefName;

public BaseXrefClass(XrefType type, string xref)
{
this.type = type;
xrefName = xref;
}

public String GetXrefName()
{
return xrefName;
}
public void SetXrefName(String name)
{
xrefName = name;
}
public void Print()
{
trace.TraceInformation("xref:" + type + ":[" + xrefName + "]");
}
public override int GetHashCode()
{
int hashCode = 0;
for (int i = 0; i < xrefName.Length; i++)
{
hashCode += (int)((xrefName[i] - '0') * (int)Math.Pow(10, (xrefName.Length - i - 1)));
}
return hashCode;
}
public override string ToString()
{
return type + ":" + xrefName;
}
}
}
40 changes: 20 additions & 20 deletions FamilyData/CorporationClass.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
using System;
using System.Runtime.Serialization;

namespace FamilyTreeLibrary.FamilyData
{
[DataContract]
public class CorporationClass
{
[DataMember]
public String name;
[DataMember]
public AddressClass address;

public CorporationClass()
{
name = "";
address = new AddressClass();
}
}
}
using System;
using System.Runtime.Serialization;

namespace Ekmansoft.FamilyTree.Library.FamilyData
{
[DataContract]
public class CorporationClass
{
[DataMember]
public String name;
[DataMember]
public AddressClass address;

public CorporationClass()
{
name = "";
address = new AddressClass();
}
}
}
Loading

0 comments on commit 886a16e

Please sign in to comment.