using System;
using System.Collections;
using System.Runtime.Serialization;
using DataHolder.Containers;
namespace GEGeneratorWizzard{
#region WizzardDataHolder
[Serializable]
public class WizzardDataHolder : DataHolder.Containers.GenericData
{
#region Constructors
public WizzardDataHolder()
{
GUID = Guid.NewGuid().ToString();
}
public WizzardDataHolder(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("DataName", typeof(string) )
,
new DataHolder.Containers.Property.Property("DataNameSpace", typeof(string) )
,
new DataHolder.Containers.Property.Property("DataFileName", typeof(string) )
,
new DataHolder.Containers.Property.Property("DataPersistorNameSpace", typeof(string) )
,
new DataHolder.Containers.Property.Property("DataPersistorClassName", typeof(string) )
,
new DataHolder.Containers.Property.Property("DataPersistorFileName", typeof(string) )
,
new DataHolder.Containers.Property.Property("ParentClass", typeof(string) , "DataHolder.Containers.GenericData", true)
,
new DataHolder.Containers.Property.Property("UseInheritedClassPersistor", typeof(bool) , false, true)
,
new DataHolder.Containers.Property.Property("TypedPropertiesCount", typeof(int) , 0, true)
,
new DataHolder.Containers.Property.Property("GUID", typeof(string), string.Empty, true)
,
new DataHolder.Containers.Property.Property("OutputDirectory", typeof(string), string.Empty, true)
,
new DataHolder.Containers.Property.TypedProperty("EntProperties", typeof(GenericDataCollection<WizzardDataProperty>) )
,
new DataHolder.Containers.Property.TypedProperty("TypedEntProperties", typeof(GenericDataCollection<WizzardTypedDataProperty>) )
,
new DataHolder.Containers.Property.TypedProperty("Tables", typeof(GenericDataCollection<WizzardDBTable>) )
}
);
}
}
public String DataName
{
get{return GetValue<string>( 0, string.Empty);}
set{SetValue<string>(0, value, string.Empty);}
}
public String DataNameSpace
{
get{return GetValue<string>( 1, string.Empty);}
set{SetValue<string>(1, value, string.Empty);}
}
public String DataFileName
{
get{return GetValue<string>( 2, string.Empty);}
set{SetValue<string>(2, value, string.Empty);}
}
public String DataPersistorNameSpace
{
get{return GetValue<string>( 3, string.Empty);}
set{SetValue<string>(3, value, string.Empty);}
}
public String DataPersistorClassName
{
get{return GetValue<string>( 4, string.Empty);}
set{SetValue<string>(4, value, string.Empty);}
}
public String DataPersistorFileName
{
get{return GetValue<string>( 5, string.Empty);}
set{SetValue<string>(5, value, string.Empty);}
}
public String ParentClass
{
get{return (String)this[6];}
set{this[6] = value;}
}
public bool UseInheritedClassPersistor
{
get{return (bool)this[7];}
set{this[7] = value;}
}
public Int32 TypedPropertiesCount
{
get{return (Int32)this[8];}
set{this[8] = value;}
}
public String GUID
{
get{return (String)this[9];}
set{this[9] = value;}
}
public String OutputDirectory
{
get{return (String)this[10];}
set{this[10] = value;}
}
public GenericDataCollection<WizzardDataProperty> EntProperties
{
get{return (GenericDataCollection<WizzardDataProperty>)this[11];}
set{this[11] = value;}
}
public GenericDataCollection<WizzardTypedDataProperty> TypedEntProperties
{
get{return (GenericDataCollection<WizzardTypedDataProperty>)this[12];}
set{this[12] = value;}
}
public GenericDataCollection<WizzardDBTable> Tables
{
get{return (GenericDataCollection<WizzardDBTable>)this[13];}
set{this[13] = value;}
}
}
#endregion
}
|