���using System;
using System.Xml;
namespace CardinalityLib
{
/// <summary>
/// This class represents the Element MyRootObject
/// </summary>
[LiquidTechnologies.Runtime.XmlObjectInfo(LiquidTechnologies.Runtime.XmlObjectBase.XmlElementGroupType.Sequence,
LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element,
"MyRootObject", "", true, false, false)]
public partial class MyRootObject : CardinalityLib.XmlCommonBase
{
#region Constructors
public MyRootObject()
{
_elementName = "MyRootObject";
Init();
}
public MyRootObject(string elementName)
{
_elementName = elementName;
Init();
}
#endregion
#region Initialization methods for the class
protected override void Init()
{
CardinalityLib.Registration.iRegistrationIndicator = 0;
m_ASimpleStringMandatoryElement = "";
m_ASimpleDateMandatoryElement = new LiquidTechnologies.Runtime.XmlDateTime(LiquidTechnologies.Runtime.XmlDateTime.DateType.date);
m_AComplexMandatoryElement = new CardinalityLib.AComplexMandatoryElement("AComplexMandatoryElement");
m_ASimpleStringOptionalElement = null;
m_ASimpleDateOptionalElement = null;
m_AComplexOptionalElement = null;
m_ASimpleStringCollectionElement = new CardinalityLib.XmlSimpleTypeCollection<string>("ASimpleStringCollectionElement", "", LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, 0, -1, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, new LiquidTechnologies.Runtime.PrimitiveRestrictions("", -1, -1, "", "", "", "", -1, -1, -1));
m_ASimpleDateCollectionElement = new CardinalityLib.XmlSimpleTypeCollection<LiquidTechnologies.Runtime.XmlDateTime>("ASimpleDateCollectionElement", "", LiquidTechnologies.Runtime.Conversions.ConversionType.type_date, 0, -1, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Collapse, new LiquidTechnologies.Runtime.PrimitiveRestrictions("", -1, -1, "", "", "", "", -1, -1, -1));
m_AComplexCollectionElement = new CardinalityLib.XmlObjectCollection<CardinalityLib.AComplexCollectionElement>("AComplexCollectionElement", "", 0, -1, false);
}
#endregion
#region ICloneable Interface
public override object Clone()
{
CardinalityLib.MyRootObject newObject = new CardinalityLib.MyRootObject(_elementName);
newObject.m_ASimpleStringMandatoryElement = m_ASimpleStringMandatoryElement;
newObject.m_ASimpleDateMandatoryElement = (LiquidTechnologies.Runtime.XmlDateTime)m_ASimpleDateMandatoryElement.Clone();
newObject.m_AComplexMandatoryElement = null;
if (m_AComplexMandatoryElement != null)
newObject.m_AComplexMandatoryElement = (CardinalityLib.AComplexMandatoryElement)m_AComplexMandatoryElement.Clone();
newObject.m_ASimpleStringOptionalElement = m_ASimpleStringOptionalElement;
if (m_ASimpleDateOptionalElement == null)
newObject.m_ASimpleDateOptionalElement = null;
else
newObject.m_ASimpleDateOptionalElement = (LiquidTechnologies.Runtime.XmlDateTime)m_ASimpleDateOptionalElement.Clone();
newObject.m_AComplexOptionalElement = null;
if (m_AComplexOptionalElement != null)
newObject.m_AComplexOptionalElement = (CardinalityLib.AComplexOptionalElement)m_AComplexOptionalElement.Clone();
foreach (string o in m_ASimpleStringCollectionElement)
newObject.m_ASimpleStringCollectionElement.Add(o);
foreach (LiquidTechnologies.Runtime.XmlDateTime o in m_ASimpleDateCollectionElement)
newObject.m_ASimpleDateCollectionElement.Add((LiquidTechnologies.Runtime.XmlDateTime)o.Clone());
foreach (CardinalityLib.AComplexCollectionElement o in m_AComplexCollectionElement)
newObject.m_AComplexCollectionElement.Add((CardinalityLib.AComplexCollectionElement)o.Clone());
return newObject;
}
#endregion
#region Member variables
protected override string TargetNamespace
{
get { return ""; }
}
#region Attribute - ASimpleStringMandatoryElement
[LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("ASimpleStringMandatoryElement", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, "", -1, -1, "", "", "", "", -1, -1, -1, null)]
public string ASimpleStringMandatoryElement
{
get
{
return m_ASimpleStringMandatoryElement;
}
set
{
value = LiquidTechnologies.Runtime.WhitespaceUtils.Preserve(value);
m_ASimpleStringMandatoryElement = value;
}
}
protected string m_ASimpleStringMandatoryElement;
#endregion
#region Attribute - ASimpleDateMandatoryElement
[LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("ASimpleDateMandatoryElement", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_date, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Collapse, "", -1, -1, "", "", "", "", -1, -1, -1, null)]
public LiquidTechnologies.Runtime.XmlDateTime ASimpleDateMandatoryElement
{
get
{
return m_ASimpleDateMandatoryElement;
}
set
{
m_ASimpleDateMandatoryElement.SetDateTime(value, m_ASimpleDateMandatoryElement.Type);
}
}
protected LiquidTechnologies.Runtime.XmlDateTime m_ASimpleDateMandatoryElement;
#endregion
#region Attribute - AComplexMandatoryElement
[LiquidTechnologies.Runtime.ElementInfoSeqClsMnd("AComplexMandatoryElement", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, typeof(CardinalityLib.AComplexMandatoryElement), true)]
public CardinalityLib.AComplexMandatoryElement AComplexMandatoryElement
{
get
{
return m_AComplexMandatoryElement;
}
set
{
Throw_IfPropertyIsNull(value, "AComplexMandatoryElement");
if (value != null)
SetElementName(value, "AComplexMandatoryElement");
m_AComplexMandatoryElement = value;
}
}
protected CardinalityLib.AComplexMandatoryElement m_AComplexMandatoryElement;
#endregion
#region Attribute - ASimpleStringOptionalElement
[LiquidTechnologies.Runtime.ElementInfoSeqPrimOpt("ASimpleStringOptionalElement", "", true, null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, "", -1, -1, "", "", "", "", -1, -1, -1, null)]
public string ASimpleStringOptionalElement
{
get
{
return m_ASimpleStringOptionalElement;
}
set
{
if (value == null)
{
m_ASimpleStringOptionalElement = null;
}
else
{
value = LiquidTechnologies.Runtime.WhitespaceUtils.Preserve(value);
m_ASimpleStringOptionalElement = value;
}
}
}
protected string m_ASimpleStringOptionalElement;
#endregion
#region Attribute - ASimpleDateOptionalElement
[LiquidTechnologies.Runtime.ElementInfoSeqPrimOpt("ASimpleDateOptionalElement", "", true, null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_date, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Collapse, "", -1, -1, "", "", "", "", -1, -1, -1, null)]
public LiquidTechnologies.Runtime.XmlDateTime ASimpleDateOptionalElement
{
get
{
return m_ASimpleDateOptionalElement;
}
set
{
if (value == null)
{
m_ASimpleDateOptionalElement = null;
}
else
{
if (m_ASimpleDateOptionalElement == null)
m_ASimpleDateOptionalElement = new LiquidTechnologies.Runtime.XmlDateTime(LiquidTechnologies.Runtime.XmlDateTime.DateType.date);
m_ASimpleDateOptionalElement.SetDateTime(value, m_ASimpleDateOptionalElement.Type);
}
}
}
protected LiquidTechnologies.Runtime.XmlDateTime m_ASimpleDateOptionalElement;
#endregion
#region Attribute - AComplexOptionalElement
[LiquidTechnologies.Runtime.ElementInfoSeqClsOpt("AComplexOptionalElement", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, typeof(CardinalityLib.AComplexOptionalElement))]
public CardinalityLib.AComplexOptionalElement AComplexOptionalElement
{
get
{
return m_AComplexOptionalElement;
}
set
{
if (value == null)
m_AComplexOptionalElement = null;
else
{
SetElementName(value, "AComplexOptionalElement");
m_AComplexOptionalElement = value;
}
}
}
protected CardinalityLib.AComplexOptionalElement m_AComplexOptionalElement;
#endregion
#region Attribute - ASimpleStringCollectionElement
[LiquidTechnologies.Runtime.ElementInfoSeqPrimCol("ASimpleStringCollectionElement", "")]
public CardinalityLib.XmlSimpleTypeCollection<string> ASimpleStringCollectionElement
{
get { return m_ASimpleStringCollectionElement; }
}
protected CardinalityLib.XmlSimpleTypeCollection<string> m_ASimpleStringCollectionElement;
#endregion
#region Attribute - ASimpleDateCollectionElement
[LiquidTechnologies.Runtime.ElementInfoSeqPrimCol("ASimpleDateCollectionElement", "")]
public CardinalityLib.XmlSimpleTypeCollection<LiquidTechnologies.Runtime.XmlDateTime> ASimpleDateCollectionElement
{
get { return m_ASimpleDateCollectionElement; }
}
protected CardinalityLib.XmlSimpleTypeCollection<LiquidTechnologies.Runtime.XmlDateTime> m_ASimpleDateCollectionElement;
#endregion
#region Attribute - AComplexCollectionElement
[LiquidTechnologies.Runtime.ElementInfoSeqClsCol("AComplexCollectionElement", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element)]
public CardinalityLib.XmlObjectCollection<CardinalityLib.AComplexCollectionElement> AComplexCollectionElement
{
get { return m_AComplexCollectionElement; }
}
protected CardinalityLib.XmlObjectCollection<CardinalityLib.AComplexCollectionElement> m_AComplexCollectionElement;
#endregion
#region Attribute - Namespace
public override string Namespace
{
get { return ""; }
}
#endregion
#region Attribute - GetBase
public override LiquidTechnologies.Runtime.XmlObjectBase GetBase()
{
return this;
}
#endregion
#endregion
}
}