using System;
using System.Collections;
using System.Runtime.Serialization;
using DataHolder.Containers;
namespace GEGeneratorWizzard{
#region WizzardTypedRelationMapping
[Serializable]
public class WizzardTypedRelationMapping : DataHolder.Containers.GenericData
{
#region Constructors
public WizzardTypedRelationMapping()
{
Guid.NewGuid().ToString();
}
public WizzardTypedRelationMapping(SerializationInfo info, StreamingContext context):base(info, context)
{
if(GUID.Length == 0)
GUID = Guid.NewGuid().ToString();
}
#endregion
protected override DataHolder.Containers.Property.PropertyCollection NewPropertyCollection
{
get
{
return new DataHolder.Containers.Property.PropertyCollection(
new DataHolder.Containers.Property.GenericDataProperty [] {
new DataHolder.Containers.Property.Property("MasterProperty", typeof(string) )
,
new DataHolder.Containers.Property.Property("DetailProperty", typeof(string) )
,
new DataHolder.Containers.Property.Property("Index", typeof(int) , 0, true)
,
new DataHolder.Containers.Property.Property("GUID", typeof(string), string.Empty, true)
}
);
}
}
public String MasterProperty
{
get{return GetValue<string>( 0, string.Empty);}
set{SetValue<string>(0, value, string.Empty);}
}
public String DetailProperty
{
get{return GetValue<string>( 1, string.Empty);}
set{SetValue<string>(1, value, string.Empty);}
}
public Int32 Index
{
get{return (Int32)this[2];}
set{this[2] = value;}
}
public String GUID
{
get{return (String)this[3];}
set{this[3] = value;}
}
}
#endregion
}
|