using System;
using System.Collections;
using System.Runtime.Serialization;
using DataHolder.Containers;
namespace GEGeneratorWizzard{
#region WizzardTypedDataProperty
[Serializable]
public class WizzardTypedDataProperty : DataHolder.Containers.GenericData
{
#region Constructors
public WizzardTypedDataProperty()
{
GUID = Guid.NewGuid().ToString();
}
public WizzardTypedDataProperty(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("PropertyName", typeof(string) )
,
new DataHolder.Containers.Property.Property("PropertyValueType", typeof(string) )
,
new DataHolder.Containers.Property.Property("AutoCreate", typeof(bool) , true, true)
,
new DataHolder.Containers.Property.Property("CreateTypedProperty", typeof(bool) , true, true)
,
new DataHolder.Containers.Property.Property("TypedPropertyType", typeof(string) )
,
new DataHolder.Containers.Property.Property("InsertOrderMasterDetail", typeof(bool) , true, true)
,
new DataHolder.Containers.Property.Property("UpdateOrderMasterDetail", typeof(bool) , true, true)
,
new DataHolder.Containers.Property.Property("DeleteOrderMasterDetail", typeof(bool) , false, true)
,
new DataHolder.Containers.Property.Property("LoadWithMaster", typeof(bool) , true, true)
,
new DataHolder.Containers.Property.Property("SaveWithMaster", typeof(bool) , true, true)
,
new DataHolder.Containers.Property.Property("RelationMappingCount", typeof(int) , 0, true)
,
new DataHolder.Containers.Property.Property("Index", typeof(int) , 0, true)
,
new DataHolder.Containers.Property.Property("TypedEntityIndex", typeof(int) , 0, true)
,
new DataHolder.Containers.Property.Property("GUID", typeof(string), string.Empty, true)
,
new DataHolder.Containers.Property.TypedProperty("RelationMapping", typeof(GenericDataCollection<WizzardTypedRelationMapping>) )
,
new DataHolder.Containers.Property.TypedProperty("Attributes", typeof(GenericDataCollection<WizzardFieldAttribute>), true )
,
new DataHolder.Containers.Property.Property("AttributesCount", typeof(int) , 0, true)
}
);
}
}
public String PropertyName
{
get{return GetValue<string>( 0, string.Empty);}
set{SetValue<string>(0, value, string.Empty);}
}
public String PropertyValueType
{
get{return GetValue<string>( 1, string.Empty);}
set{SetValue<string>(1, value, string.Empty);}
}
public bool AutoCreate
{
get{return (bool)this[2];}
set{this[2] = value;}
}
public bool CreateTypedProperty
{
get{return (bool)this[3];}
set{this[3] = value;}
}
public String TypedPropertyType
{
get{return GetValue<string>( 4, string.Empty);}
set{SetValue<string>(4, value, string.Empty);}
}
public bool InsertOrderMasterDetail
{
get{return (bool)this[5];}
set{this[5] = value;}
}
public bool UpdateOrderMasterDetail
{
get{return (bool)this[6];}
set{this[6] = value;}
}
public bool DeleteOrderMasterDetail
{
get{return (bool)this[7];}
set{this[7] = value;}
}
public bool LoadWithMaster
{
get{return (bool)this[8];}
set{this[8] = value;}
}
public bool SaveWithMaster
{
get{return (bool)this[9];}
set{this[9] = value;}
}
public Int32 RelationMappingCount
{
get{return (Int32)this[10];}
set{this[10] = value;}
}
public Int32 Index
{
get{return (Int32)this[11];}
set{this[11] = value;}
}
public Int32 TypedEntityIndex
{
get{return (Int32)this[12];}
set{this[12] = value;}
}
public String GUID
{
get{return (String)this[13];}
set{this[13] = value;}
}
public GenericDataCollection<WizzardTypedRelationMapping> RelationMapping
{
get{return (GenericDataCollection<WizzardTypedRelationMapping>)this[14];}
set{this[14] = value;}
}
public GenericDataCollection<WizzardFieldAttribute> Attributes
{
get{return (GenericDataCollection<WizzardFieldAttribute>)this[15];}
set{this[15] = value;}
}
public Int32 AttributesCount
{
get{return (Int32)this[16];}
set{this[16] = value;}
}
}
#endregion
}
|