using System;
using System.Collections;
using System.Runtime.Serialization;
using DataHolder.Containers;
namespace GEGeneratorWizzard{
#region WizzardDataProperty
[Serializable]
public class WizzardDataProperty : DataHolder.Containers.GenericData
{
#region Constructors
public WizzardDataProperty()
{
GUID = Guid.NewGuid().ToString();
}
public WizzardDataProperty(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("DefaultValue", typeof(string) )
,
new DataHolder.Containers.Property.Property("Mandatory", typeof(bool) , false, true)
,
new DataHolder.Containers.Property.Property("CreateTypedProperty", typeof(bool) , true, true)
,
new DataHolder.Containers.Property.Property("TypedPropertyType", typeof(string) )
,
new DataHolder.Containers.Property.Property("UseTypedFunction", typeof(bool) , false, true)
,
new DataHolder.Containers.Property.Property("NullValue", typeof(string) )
,
new DataHolder.Containers.Property.Property("Selectable", typeof(bool) , false, true)
,
new DataHolder.Containers.Property.Property("Persistable", typeof(bool) , false, true)
,
new DataHolder.Containers.Property.Property("Index", typeof(int) , 0, true)
,
new DataHolder.Containers.Property.Property("GUID", typeof(string), string.Empty, true)
,
new DataHolder.Containers.Property.TypedProperty("SimplePersistenceField", typeof(WizzardSimplePersistenceField), false )
,
new DataHolder.Containers.Property.TypedProperty("TablePersistenceField", typeof(WizzardTablePersistenceField), false )
,
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 String DefaultValue
{
get{return GetValue<string>( 2, string.Empty);}
set{SetValue<string>(2, value, string.Empty);}
}
public bool Mandatory
{
get{return (bool)this[3];}
set{this[3] = value;}
}
public bool CreateTypedProperty
{
get{return (bool)this[4];}
set{this[4] = value;}
}
public String TypedPropertyType
{
get{return GetValue<string>( 5, string.Empty);}
set{SetValue<string>(5, value, string.Empty);}
}
public bool UseTypedFunction
{
get{return (bool)this[6];}
set{this[6] = value;}
}
public String NullValue
{
get{return GetValue<string>( 7, string.Empty);}
set{SetValue<string>(7, value, string.Empty);}
}
public bool Selectable
{
get{return (bool)this[8];}
set{this[8] = value;}
}
public bool Persistable
{
get{return (bool)this[9];}
set{this[9] = value;}
}
public Int32 Index
{
get{return (Int32)this[10];}
set{this[10] = value;}
}
public String GUID
{
get{return (String)this[11];}
set{this[11] = value;}
}
public WizzardSimplePersistenceField SimplePersistenceField
{
get{return (WizzardSimplePersistenceField)this[12];}
set{this[12] = value;}
}
public WizzardTablePersistenceField TablePersistenceField
{
get{return (WizzardTablePersistenceField)this[13];}
set{this[13] = value;}
}
public GenericDataCollection<WizzardFieldAttribute> Attributes
{
get{return (GenericDataCollection<WizzardFieldAttribute>)this[14];}
set{this[14] = value;}
}
public Int32 AttributesCount
{
get{return (Int32)this[15];}
set{this[15] = value;}
}
}
#endregion
}
|