using System;
using System.Collections;
using System.Runtime.Serialization;
using DataHolder.Containers;
namespace GEGeneratorWizzard{
#region WizzardTablePersistenceField
[Serializable]
public class WizzardTablePersistenceField : DataHolder.Containers.GenericData
{
#region Constructors
public WizzardTablePersistenceField()
{
GUID = Guid.NewGuid().ToString();
}
public WizzardTablePersistenceField(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("TableIndex", typeof(int) , -1, true)
,
new DataHolder.Containers.Property.Property("FiledName", typeof(string) )
,
new DataHolder.Containers.Property.Property("Alias", typeof(string) )
,
new DataHolder.Containers.Property.Property("TypeofIdentity", typeof(string) )
,
new DataHolder.Containers.Property.Property("TableGUID", typeof(string) )
,
new DataHolder.Containers.Property.Property("GUID", typeof(string), string.Empty, true)
,
new DataHolder.Containers.Property.Property("TableName", typeof(string) )
}
);
}
}
public Int32 TableIndex
{
get{return (Int32)this[0];}
set{this[0] = value;}
}
public String FiledName
{
get{return GetValue<string>( 1, string.Empty);}
set{SetValue<string>(1, value, string.Empty);}
}
public String Alias
{
get{return GetValue<string>( 2, string.Empty);}
set{SetValue<string>(2, value, string.Empty);}
}
public String TypeofIdentity
{
get{return GetValue<string>( 3, string.Empty);}
set{SetValue<string>(3, value, string.Empty);}
}
public String TableGUID
{
get{return GetValue<string>( 4, string.Empty);}
set{SetValue<string>(4, value, string.Empty);}
}
public String GUID
{
get{return (String)this[5];}
set{this[5] = value;}
}
public string TableName
{
get{return GetValue<string>( 6, string.Empty);}
set{SetValue<string>(6, value, string.Empty);}
}
}
#endregion
}
|