using System;
using System.Collections;
using System.Runtime.Serialization;
using DataHolder.Containers;
namespace GEGeneratorWizzard{
#region WizzardSimplePersistenceField
[Serializable]
public class WizzardSimplePersistenceField : DataHolder.Containers.GenericData
{
#region Constructors
public WizzardSimplePersistenceField()
{
GUID = Guid.NewGuid().ToString();
}
public WizzardSimplePersistenceField(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("RecordSetName", typeof(string) )
,
new DataHolder.Containers.Property.Property("SelectText", typeof(string) )
,
new DataHolder.Containers.Property.Property("UseAlias", typeof(bool) , false, true)
,
new DataHolder.Containers.Property.Property("GUID", typeof(string), string.Empty, true)
}
);
}
}
public String RecordSetName
{
get{return GetValue<string>( 0, string.Empty);}
set{SetValue<string>(0, value, string.Empty);}
}
public String SelectText
{
get{return GetValue<string>( 1, string.Empty);}
set{SetValue<string>(1, value, string.Empty);}
}
public bool UseAlias
{
get{return (bool)this[2];}
set{this[2] = value;}
}
public String GUID
{
get{return (String)this[3];}
set{this[3] = value;}
}
}
#endregion
}
|