C# Sample : Music Store
Schema Summary This sample shows how a to use the generated code to implement a simple request response (client/server) application. Schema Details The Request represents a search request for an album (like the interfaces exposed by Amazon or Play). The response represents the result of the search, in this case either a set of results or an error. If results are returned then this may contain 0-n products (a product being an album), each album has one or more tracks, and a track has a title and length. Sample Description The sample demonstrates how to Create a request document, get the underlying XML. Decode the request, and build a response. Then decode and display the response. In short both side of a very simple client server application. |
Sample XML File
![]() ![]() |
<?xml version="1.0" encoding="UTF-8"?> <SearchResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MusicStore.xsd"> <Result> <SearchDate>2003-01-20</SearchDate> <Product Label="Parlophone" ProductCode="0004U94562457MS" RRP="7.99"> <AlbumName>Parachutes</AlbumName> <ArtistName>ColdPlay</ArtistName> <Track> <Title>Don't Panic</Title> <Length>PT2M10S</Length> </Track> <Track> <Title>Shiver</Title> <Length>PT3M10S</Length> </Track> <Track> <Title>Spies</Title> <Length>PT2M12S</Length> </Track> <Track> <Title>Sparks</Title> <Length>PT3M40S</Length> </Track> <Track> <Title>Yellow</Title> <Length>PT6M12S</Length> </Track> <Track> <Title>Trouble</Title> <Length>PT3M12S</Length> </Track> <Track> <Title>Parachutes</Title> <Length>PT3M21S</Length> </Track> <Track> <Title>High Speed</Title> <Length>PT4M10S</Length> </Track> <Track> <Title>We Never Change</Title> <Length>PT4M36S</Length> </Track> <Track> <Title>Everything's Not Lost</Title> <Length>PT2M59S</Length> </Track> </Product> <Product Label="Parlophone" ProductCode="1001542157321SW" RRP="8.59"> <AlbumName>X&Y</AlbumName> <ArtistName>ColdPlay</ArtistName> <Track> <Title>Square One</Title> <Length>PT2M10S</Length> </Track> <Track> <Title>What If</Title> <Length>PT3M01S</Length> </Track> <Track> <Title>White Shadows</Title> <Length>PT3M04S</Length> </Track> <Track> <Title>Fix You</Title> <Length>PT4M36S</Length> </Track> <Track> <Title>Talk</Title> <Length>PT5M42S</Length> </Track> <Track> <Title>X&Y</Title> <Length>PT2M12S</Length> </Track> <Track> <Title>Speed Of Sound</Title> <Length>PT3M58S</Length> </Track> <Track> <Title>A Message</Title> <Length>PT4M15S</Length> </Track> <Track> <Title>Low</Title> <Length>PT3M21S</Length> </Track> <Track> <Title>The Hardest Part</Title> <Length>PT4M24S</Length> </Track> <Track> <Title>Swallowed In The Sea</Title> <Length>PT2M35S</Length> </Track> <Track> <Title>Twisted Logic</Title> <Length>PT5M54S</Length> </Track> <Track> <Title>Till Kingdom Come</Title> <Length>PT10M15S</Length> </Track> </Product> </Result> </SearchResponse> |
![]() ![]() |
||
string strXmlRequest = CreateSearchRequest(); string strXmlResponse = ProcessSearchRequest(strXmlRequest); DisplayResults(strXmlResponse); private static string CreateSearchRequest() { // create an instance of the class MusicStoreLib.SearchRequest request = new MusicStoreLib.SearchRequest(); // setup our search criteria request.NameFilter = "coldplay"; request.PriceFilter.MaxPrice = 9.99; // Return the Request XML return request.ToXml(); }
private static string ProcessSearchRequest(string strRequestXML) { // create an instance of the class to load the XML file into MusicStoreLib.SearchRequest request = new MusicStoreLib.SearchRequest(); // load the request request.FromXml(strRequestXML); // use the search criteria in a query string strXmlResponse = GetSearchResults(request.NameFilter, (request.PriceFilter.MinPrice != null ? (double)request.PriceFilter.MinPrice : 0), (request.PriceFilter.MaxPrice != null ? (double)request.PriceFilter.MaxPrice : Double.MaxValue)); return strXmlResponse; } private static string GetSearchResults(string strNameFilter, double minValueFilter, double maxValueFilter) { // setup Database query (use your imagination!) string strSQLAlbum = "SELECT * " + "FROM Album " + "WHERE ArtistName = @ArtistFilter AND " + " Price > @MinPriceFilter AND " + " Price < @MaxPriceFilter AND "; string strSQLTrack = "SELECT * " + "FROM Track " + "WHERE AlbumID = @AlbumID"; SqlConnection conn = new SqlConnection("..."); SqlCommand cmdAlbum = new SqlCommand(strSQLAlbum, conn); SqlDataAdapter adpAlbum = new SqlDataAdapter(); DataSet dsAlbum = new DataSet(); SqlCommand cmdTrack = new SqlCommand(strSQLTrack, conn); SqlDataAdapter adpTrack = new SqlDataAdapter(); DataSet dsTrack = new DataSet(); cmdAlbum.Parameters.Add(strNameFilter); cmdAlbum.Parameters.Add(minValueFilter); cmdAlbum.Parameters.Add(maxValueFilter); cmdTrack.Parameters.Add(0); // query the database adpAlbum.SelectCommand = cmdAlbum; adpAlbum.Fill(dsAlbum, "Album"); // create an instance of the class to load the XML file into MusicStoreLib.SearchResponse response = new MusicStoreLib.SearchResponse(); response.Result.SearchDate = new XmlDateTime(DateTime.Now); foreach (DataRow rAlbum in dsAlbum.Tables["Album"].Rows) { // Add a new album to the collection MusicStoreLib.AlbumType album = new MusicStoreLib.AlbumType(); response.Result.Product.Add(album); // populate the album album.AlbumName = rAlbum["AlbumName"].ToString(); album.ArtistName = rAlbum["ArtistName"].ToString(); album.Label = rAlbum["RecordLabel"].ToString(); album.ProductCode = rAlbum["ProductCode"].ToString(); if (rAlbum["Price"] != null) album.RRP = (double)rAlbum["Price"]; // Query the DB for all the tracks in the album cmdTrack.Parameters[0].Value = rAlbum["AlbumID"]; adpTrack.SelectCommand = cmdTrack; adpTrack.Fill(dsTrack, "Track"); // add all the tracks foreach (DataRow rTrack in dsTrack.Tables["Track"].Rows) { // create a track in the XML MusicStoreLib.TrackType track = new MusicStoreLib.TrackType(); album.Track.Add(track); // populate the track track.Title = rTrack["Title"].ToString(); track.Length.Seconds = (ulong)rTrack["Duration"]; } } // always call Close when done reading. conn.Close(); // return the XML return response.ToXml(); } private static void DisplayResults(string strXmlResponse) { // create an instance of the class to load the XML file into MusicStoreLib.SearchResponse response = new MusicStoreLib.SearchResponse(); // load the xml from a file into the object (the root element in the // xml document must be <SearchResponse>. response.FromXml(strXmlResponse); if (response.ChoiceSelectedElement == "Result") { Console.WriteLine("Query Was Executes {0}", response.Result.SearchDate); foreach (MusicStoreLib.AlbumType album in response.Result.Product) { // ouput each album that was found Console.WriteLine("Artist Name : {0}", album.ArtistName); Console.WriteLine("Album Title : {0}", album.AlbumName); Console.WriteLine("Product Code : {0}", album.ProductCode); Console.WriteLine("Record Label : {0}", album.Label); if (album.RRP != null) Console.WriteLine("Price : {0}", album.RRP); // output the tracks foreach (MusicStoreLib.TrackType track in album.Track) { Console.WriteLine(" Track Name: {0} ({1:D2}:{2:D2})", track.Title, track.Length.Minutes, track.Length.Seconds); } } } else if (response.ChoiceSelectedElement == "Error") { Console.WriteLine("An Error Occured"); Console.WriteLine("Error Code : {0}", response.Error.ErrorCode); Console.WriteLine("Descritpion : {0}", response.Error.ErrorDescription); if (response.Error.HelpFile != null) Console.WriteLine("Help File : {0}", response.Error.HelpFile); } else { // error - should always have a result or an error } }
|
![]() ![]() |
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="SearchRequest"> <xs:complexType> <xs:sequence> <xs:element name="PriceFilter"> <xs:complexType> <xs:sequence> <xs:element name="MinPrice" type="xs:double" minOccurs="0"/> <xs:element name="MaxPrice" type="xs:double" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="NameFilter" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="SearchResponse"> <xs:complexType> <xs:choice> <xs:element name="Result"> <xs:complexType> <xs:sequence> <xs:element name="SearchDate" type="xs:date"/> <xs:element name="Product" type="AlbumType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Error"> <xs:complexType> <xs:sequence> <xs:element name="ErrorCode" type="xs:int"/> <xs:element name="ErrorDescription" type="xs:string"/> <xs:element name="HelpFile" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> <xs:complexType name="AlbumType"> <xs:sequence> <xs:element name="AlbumName" type="xs:string"/> <xs:element name="ArtistName" type="xs:string"/> <xs:element name="Track" type="TrackType" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="Label" type="xs:string" use="required"/> <xs:attribute name="RRP" type="xs:double"/> <xs:attribute name="ProductCode" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:length value="15"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> <xs:complexType name="CompactDiskType"> <xs:sequence> <xs:element name="Title" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:complexType name="TrackType"> <xs:sequence> <xs:element name="Title" type="xs:string"/> <xs:element name="Length" type="xs:duration"/> </xs:sequence> </xs:complexType> </xs:schema> |
![]() ![]() |
![]() |
![]() ![]() |
���using System; using System.Xml; /********************************************************************************************** * Copyright (c) 2001-2023 Liquid Technologies Limited. All rights reserved. * See www.liquid-technologies.com for product details. * * Please see products End User License Agreement for distribution permissions. * * WARNING: THIS FILE IS GENERATED * Changes made outside of ##HAND_CODED_BLOCK_START blocks will be overwritten * * Generation : by Liquid XML Data Binder 19.0.14.11049 * Using Schema: MusicStore.xsd **********************************************************************************************/ namespace MusicStoreLib { /// <summary> /// This class represents the ComplexType AlbumType /// </summary> [LiquidTechnologies.Runtime.XmlObjectInfo(LiquidTechnologies.Runtime.XmlObjectBase.XmlElementGroupType.Sequence, LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, "AlbumType", "", true, false, false)] public partial class AlbumType : MusicStoreLib.XmlCommonBase { #region Constructors /// <summary> /// Constructor for AlbumType /// </summary> /// <remarks> /// The class is created with all the mandatory fields populated with the /// default data. /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd /// </remarks> public AlbumType() { _elementName = "AlbumType"; Init(); } public AlbumType(string elementName) { _elementName = elementName; Init(); } #endregion #region Initialization methods for the class /// <summary> /// Initializes the class /// </summary> /// <remarks> /// This creates all the mandatory fields (populated with the default data) /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd. /// </remarks> protected override void Init() { MusicStoreLib.Registration.iRegistrationIndicator = 0; // causes registration to take place m_Label = ""; m_RRP = null; m_ProductCode = ""; m_AlbumName = ""; m_ArtistName = ""; m_Track = new MusicStoreLib.XmlObjectCollection<MusicStoreLib.TrackType>("Track", "", 1, -1, false); // ##HAND_CODED_BLOCK_START ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional initialization code here... // ##HAND_CODED_BLOCK_END ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } #endregion #region ICloneable Interface /// <summary> /// Allows the class to be copied /// </summary> /// <remarks> /// Performs a 'deep copy' of all the data in the class (and its children) /// </remarks> public override object Clone() { MusicStoreLib.AlbumType newObject = new MusicStoreLib.AlbumType(_elementName); newObject.m_Label = m_Label; newObject.m_RRP = m_RRP; newObject.m_ProductCode = m_ProductCode; newObject.m_AlbumName = m_AlbumName; newObject.m_ArtistName = m_ArtistName; foreach (MusicStoreLib.TrackType o in m_Track) newObject.m_Track.Add((MusicStoreLib.TrackType)o.Clone()); // ##HAND_CODED_BLOCK_START ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional clone code here... // ##HAND_CODED_BLOCK_END ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS return newObject; } #endregion #region Member variables protected override string TargetNamespace { get { return ""; } } #region Attribute - Label /// <summary> /// Represents a mandatory Attribute in the XML document /// </summary> /// <remarks> /// This property is represented as an Attribute in the XML. /// It is mandatory and therefore must be populated within the XML. /// It is defaulted to "". /// </remarks> [LiquidTechnologies.Runtime.AttributeInfoPrimitive("Label", "", LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public string Label { get { return m_Label; } set { // Apply whitespace rules appropriately value = LiquidTechnologies.Runtime.WhitespaceUtils.Preserve(value); m_Label = value; } } protected string m_Label; #endregion #region Attribute - RRP /// <summary> /// Represents an optional Attribute in the XML document /// </summary> /// <remarks> /// This property is represented as an Attribute in the XML. /// It is optional, initially it is not valid. /// </remarks> [LiquidTechnologies.Runtime.AttributeInfoPrimitive("RRP", "", true, LiquidTechnologies.Runtime.Conversions.ConversionType.type_r8, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Collapse, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public double? RRP { get { return m_RRP; } set { if (value == null) { m_RRP = null; } else { m_RRP = value; } } } protected double? m_RRP; #endregion #region Attribute - ProductCode /// <summary> /// Represents a mandatory Attribute in the XML document /// </summary> /// <remarks> /// This property is represented as an Attribute in the XML. /// It is mandatory and therefore must be populated within the XML. /// It is defaulted to "". /// </remarks> [LiquidTechnologies.Runtime.AttributeInfoPrimitive("ProductCode", "", LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, "", -1, -1, "", "", "", "", 15, -1, -1, null)] public string ProductCode { get { return m_ProductCode; } set { // Apply whitespace rules appropriately value = LiquidTechnologies.Runtime.WhitespaceUtils.Preserve(value); CheckAttributeRestriction(2, value); m_ProductCode = value; } } protected string m_ProductCode; #endregion #region Attribute - AlbumName /// <summary> /// Represents a mandatory Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is mandatory and therefore must be populated within the XML. /// It is defaulted to "". /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("AlbumName", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public string AlbumName { get { return m_AlbumName; } set { // Apply whitespace rules appropriately value = LiquidTechnologies.Runtime.WhitespaceUtils.Preserve(value); m_AlbumName = value; } } protected string m_AlbumName; #endregion #region Attribute - ArtistName /// <summary> /// Represents a mandatory Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is mandatory and therefore must be populated within the XML. /// It is defaulted to "". /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("ArtistName", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public string ArtistName { get { return m_ArtistName; } set { // Apply whitespace rules appropriately value = LiquidTechnologies.Runtime.WhitespaceUtils.Preserve(value); m_ArtistName = value; } } protected string m_ArtistName; #endregion #region Attribute - Track /// <summary> /// A collection of Tracks /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// This collection may contain 1 to Many objects. /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqClsCol("Track", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element)] public MusicStoreLib.XmlObjectCollection<MusicStoreLib.TrackType> Track { get { return m_Track; } } protected MusicStoreLib.XmlObjectCollection<MusicStoreLib.TrackType> m_Track; #endregion #region Attribute - Namespace public override string Namespace { get { return ""; } } #endregion #region Attribute - GetBase public override LiquidTechnologies.Runtime.XmlObjectBase GetBase() { return this; } #endregion #endregion // ##HAND_CODED_BLOCK_START ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional Methods and members here... // ##HAND_CODED_BLOCK_END ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } } |
![]() ![]() |
���using System; using System.Xml; /********************************************************************************************** * Copyright (c) 2001-2023 Liquid Technologies Limited. All rights reserved. * See www.liquid-technologies.com for product details. * * Please see products End User License Agreement for distribution permissions. * * WARNING: THIS FILE IS GENERATED * Changes made outside of ##HAND_CODED_BLOCK_START blocks will be overwritten * * Generation : by Liquid XML Data Binder 19.0.14.11049 * Using Schema: MusicStore.xsd **********************************************************************************************/ namespace MusicStoreLib { /// <summary> /// This class represents the ComplexType Error /// </summary> [LiquidTechnologies.Runtime.XmlObjectInfo(LiquidTechnologies.Runtime.XmlObjectBase.XmlElementGroupType.Sequence, LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, "Error", "", true, false, false)] public partial class Error : MusicStoreLib.XmlCommonBase { #region Constructors /// <summary> /// Constructor for Error /// </summary> /// <remarks> /// The class is created with all the mandatory fields populated with the /// default data. /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd /// </remarks> public Error() { _elementName = "Error"; Init(); } public Error(string elementName) { _elementName = elementName; Init(); } #endregion #region Initialization methods for the class /// <summary> /// Initializes the class /// </summary> /// <remarks> /// This creates all the mandatory fields (populated with the default data) /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd. /// </remarks> protected override void Init() { MusicStoreLib.Registration.iRegistrationIndicator = 0; // causes registration to take place m_ErrorCode = 0; m_ErrorDescription = ""; m_HelpFile = null; // ##HAND_CODED_BLOCK_START ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional initialization code here... // ##HAND_CODED_BLOCK_END ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } #endregion #region ICloneable Interface /// <summary> /// Allows the class to be copied /// </summary> /// <remarks> /// Performs a 'deep copy' of all the data in the class (and its children) /// </remarks> public override object Clone() { MusicStoreLib.Error newObject = new MusicStoreLib.Error(_elementName); newObject.m_ErrorCode = m_ErrorCode; newObject.m_ErrorDescription = m_ErrorDescription; newObject.m_HelpFile = m_HelpFile; // ##HAND_CODED_BLOCK_START ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional clone code here... // ##HAND_CODED_BLOCK_END ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS return newObject; } #endregion #region Member variables protected override string TargetNamespace { get { return ""; } } #region Attribute - ErrorCode /// <summary> /// Represents a mandatory Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is mandatory and therefore must be populated within the XML. /// It is defaulted to 0. /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("ErrorCode", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_i4, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Collapse, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public int ErrorCode { get { return m_ErrorCode; } set { m_ErrorCode = value; } } protected int m_ErrorCode; #endregion #region Attribute - ErrorDescription /// <summary> /// Represents a mandatory Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is mandatory and therefore must be populated within the XML. /// It is defaulted to "". /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("ErrorDescription", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public string ErrorDescription { get { return m_ErrorDescription; } set { // Apply whitespace rules appropriately value = LiquidTechnologies.Runtime.WhitespaceUtils.Preserve(value); m_ErrorDescription = value; } } protected string m_ErrorDescription; #endregion #region Attribute - HelpFile /// <summary> /// Represents an optional Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is optional, initially it is not valid. /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimOpt("HelpFile", "", true, null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public string HelpFile { get { return m_HelpFile; } set { if (value == null) { m_HelpFile = null; } else { // Apply whitespace rules appropriately value = LiquidTechnologies.Runtime.WhitespaceUtils.Preserve(value); m_HelpFile = value; } } } protected string m_HelpFile; #endregion #region Attribute - Namespace public override string Namespace { get { return ""; } } #endregion #region Attribute - GetBase public override LiquidTechnologies.Runtime.XmlObjectBase GetBase() { return this; } #endregion #endregion // ##HAND_CODED_BLOCK_START ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional Methods and members here... // ##HAND_CODED_BLOCK_END ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } } |
![]() ![]() |
���using System; using System.Xml; /********************************************************************************************** * Copyright (c) 2001-2023 Liquid Technologies Limited. All rights reserved. * See www.liquid-technologies.com for product details. * * Please see products End User License Agreement for distribution permissions. * * WARNING: THIS FILE IS GENERATED * Changes made outside of ##HAND_CODED_BLOCK_START blocks will be overwritten * * Generation : by Liquid XML Data Binder 19.0.14.11049 * Using Schema: MusicStore.xsd **********************************************************************************************/ namespace MusicStoreLib { /// <summary> /// This class represents the ComplexType PriceFilter /// </summary> [LiquidTechnologies.Runtime.XmlObjectInfo(LiquidTechnologies.Runtime.XmlObjectBase.XmlElementGroupType.Sequence, LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, "PriceFilter", "", true, false, false)] public partial class PriceFilter : MusicStoreLib.XmlCommonBase { #region Constructors /// <summary> /// Constructor for PriceFilter /// </summary> /// <remarks> /// The class is created with all the mandatory fields populated with the /// default data. /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd /// </remarks> public PriceFilter() { _elementName = "PriceFilter"; Init(); } public PriceFilter(string elementName) { _elementName = elementName; Init(); } #endregion #region Initialization methods for the class /// <summary> /// Initializes the class /// </summary> /// <remarks> /// This creates all the mandatory fields (populated with the default data) /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd. /// </remarks> protected override void Init() { MusicStoreLib.Registration.iRegistrationIndicator = 0; // causes registration to take place m_MinPrice = null; m_MaxPrice = null; // ##HAND_CODED_BLOCK_START ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional initialization code here... // ##HAND_CODED_BLOCK_END ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } #endregion #region ICloneable Interface /// <summary> /// Allows the class to be copied /// </summary> /// <remarks> /// Performs a 'deep copy' of all the data in the class (and its children) /// </remarks> public override object Clone() { MusicStoreLib.PriceFilter newObject = new MusicStoreLib.PriceFilter(_elementName); newObject.m_MinPrice = m_MinPrice; newObject.m_MaxPrice = m_MaxPrice; // ##HAND_CODED_BLOCK_START ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional clone code here... // ##HAND_CODED_BLOCK_END ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS return newObject; } #endregion #region Member variables protected override string TargetNamespace { get { return ""; } } #region Attribute - MinPrice /// <summary> /// Represents an optional Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is optional, initially it is not valid. /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimOpt("MinPrice", "", true, null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_r8, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Collapse, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public double? MinPrice { get { return m_MinPrice; } set { if (value == null) { m_MinPrice = null; } else { m_MinPrice = value; } } } protected double? m_MinPrice; #endregion #region Attribute - MaxPrice /// <summary> /// Represents an optional Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is optional, initially it is not valid. /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimOpt("MaxPrice", "", true, null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_r8, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Collapse, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public double? MaxPrice { get { return m_MaxPrice; } set { if (value == null) { m_MaxPrice = null; } else { m_MaxPrice = value; } } } protected double? m_MaxPrice; #endregion #region Attribute - Namespace public override string Namespace { get { return ""; } } #endregion #region Attribute - GetBase public override LiquidTechnologies.Runtime.XmlObjectBase GetBase() { return this; } #endregion #endregion // ##HAND_CODED_BLOCK_START ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional Methods and members here... // ##HAND_CODED_BLOCK_END ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } } |
![]() ![]() |
���using System; using System.Xml; /********************************************************************************************** * Copyright (c) 2001-2023 Liquid Technologies Limited. All rights reserved. * See www.liquid-technologies.com for product details. * * Please see products End User License Agreement for distribution permissions. * * WARNING: THIS FILE IS GENERATED * Changes made outside of ##HAND_CODED_BLOCK_START blocks will be overwritten * * Generation : by Liquid XML Data Binder 19.0.14.11049 * Using Schema: MusicStore.xsd **********************************************************************************************/ namespace MusicStoreLib { /// <summary> /// This class represents the ComplexType Result /// </summary> [LiquidTechnologies.Runtime.XmlObjectInfo(LiquidTechnologies.Runtime.XmlObjectBase.XmlElementGroupType.Sequence, LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, "Result", "", true, false, false)] public partial class Result : MusicStoreLib.XmlCommonBase { #region Constructors /// <summary> /// Constructor for Result /// </summary> /// <remarks> /// The class is created with all the mandatory fields populated with the /// default data. /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd /// </remarks> public Result() { _elementName = "Result"; Init(); } public Result(string elementName) { _elementName = elementName; Init(); } #endregion #region Initialization methods for the class /// <summary> /// Initializes the class /// </summary> /// <remarks> /// This creates all the mandatory fields (populated with the default data) /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd. /// </remarks> protected override void Init() { MusicStoreLib.Registration.iRegistrationIndicator = 0; // causes registration to take place m_SearchDate = new LiquidTechnologies.Runtime.XmlDateTime(LiquidTechnologies.Runtime.XmlDateTime.DateType.date); m_Product = new MusicStoreLib.XmlObjectCollection<MusicStoreLib.AlbumType>("Product", "", 0, -1, false); // ##HAND_CODED_BLOCK_START ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional initialization code here... // ##HAND_CODED_BLOCK_END ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } #endregion #region ICloneable Interface /// <summary> /// Allows the class to be copied /// </summary> /// <remarks> /// Performs a 'deep copy' of all the data in the class (and its children) /// </remarks> public override object Clone() { MusicStoreLib.Result newObject = new MusicStoreLib.Result(_elementName); newObject.m_SearchDate = (LiquidTechnologies.Runtime.XmlDateTime)m_SearchDate.Clone(); foreach (MusicStoreLib.AlbumType o in m_Product) newObject.m_Product.Add((MusicStoreLib.AlbumType)o.Clone()); // ##HAND_CODED_BLOCK_START ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional clone code here... // ##HAND_CODED_BLOCK_END ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS return newObject; } #endregion #region Member variables protected override string TargetNamespace { get { return ""; } } #region Attribute - SearchDate /// <summary> /// Represents a mandatory Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is mandatory and therefore must be populated within the XML. /// It is defaulted to new LiquidTechnologies.Runtime.XmlDateTime(LiquidTechnologies.Runtime.XmlDateTime.DateType.date). /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("SearchDate", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_date, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Collapse, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public LiquidTechnologies.Runtime.XmlDateTime SearchDate { get { return m_SearchDate; } set { m_SearchDate.SetDateTime(value, m_SearchDate.Type); } } protected LiquidTechnologies.Runtime.XmlDateTime m_SearchDate; #endregion #region Attribute - Product /// <summary> /// A collection of Products /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// This collection may contain 0 to Many objects. /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqClsCol("Product", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element)] public MusicStoreLib.XmlObjectCollection<MusicStoreLib.AlbumType> Product { get { return m_Product; } } protected MusicStoreLib.XmlObjectCollection<MusicStoreLib.AlbumType> m_Product; #endregion #region Attribute - Namespace public override string Namespace { get { return ""; } } #endregion #region Attribute - GetBase public override LiquidTechnologies.Runtime.XmlObjectBase GetBase() { return this; } #endregion #endregion // ##HAND_CODED_BLOCK_START ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional Methods and members here... // ##HAND_CODED_BLOCK_END ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } } |
![]() ![]() |
���using System; using System.Xml; /********************************************************************************************** * Copyright (c) 2001-2023 Liquid Technologies Limited. All rights reserved. * See www.liquid-technologies.com for product details. * * Please see products End User License Agreement for distribution permissions. * * WARNING: THIS FILE IS GENERATED * Changes made outside of ##HAND_CODED_BLOCK_START blocks will be overwritten * * Generation : by Liquid XML Data Binder 19.0.14.11049 * Using Schema: MusicStore.xsd **********************************************************************************************/ namespace MusicStoreLib { /// <summary> /// This class represents the Element SearchRequest /// </summary> [LiquidTechnologies.Runtime.XmlObjectInfo(LiquidTechnologies.Runtime.XmlObjectBase.XmlElementGroupType.Sequence, LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, "SearchRequest", "", true, false, false)] public partial class SearchRequest : MusicStoreLib.XmlCommonBase { #region Constructors /// <summary> /// Constructor for SearchRequest /// </summary> /// <remarks> /// The class is created with all the mandatory fields populated with the /// default data. /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd /// </remarks> public SearchRequest() { _elementName = "SearchRequest"; Init(); } public SearchRequest(string elementName) { _elementName = elementName; Init(); } #endregion #region Initialization methods for the class /// <summary> /// Initializes the class /// </summary> /// <remarks> /// This creates all the mandatory fields (populated with the default data) /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd. /// </remarks> protected override void Init() { MusicStoreLib.Registration.iRegistrationIndicator = 0; // causes registration to take place m_PriceFilter = new MusicStoreLib.PriceFilter("PriceFilter"); m_NameFilter = ""; // ##HAND_CODED_BLOCK_START ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional initialization code here... // ##HAND_CODED_BLOCK_END ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } #endregion #region ICloneable Interface /// <summary> /// Allows the class to be copied /// </summary> /// <remarks> /// Performs a 'deep copy' of all the data in the class (and its children) /// </remarks> public override object Clone() { MusicStoreLib.SearchRequest newObject = new MusicStoreLib.SearchRequest(_elementName); newObject.m_PriceFilter = null; if (m_PriceFilter != null) newObject.m_PriceFilter = (MusicStoreLib.PriceFilter)m_PriceFilter.Clone(); newObject.m_NameFilter = m_NameFilter; // ##HAND_CODED_BLOCK_START ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional clone code here... // ##HAND_CODED_BLOCK_END ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS return newObject; } #endregion #region Member variables protected override string TargetNamespace { get { return ""; } } #region Attribute - PriceFilter /// <summary> /// Represents a mandatory Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is mandatory and therefore must be populated within the XML. /// If this property is set, then the object will be COPIED. If the property is set to null an exception is raised. /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqClsMnd("PriceFilter", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, typeof(MusicStoreLib.PriceFilter), false)] public MusicStoreLib.PriceFilter PriceFilter { get { return m_PriceFilter; } set { Throw_IfPropertyIsNull(value, "PriceFilter"); if (value != null) SetElementName(value, "PriceFilter"); m_PriceFilter = value; } } protected MusicStoreLib.PriceFilter m_PriceFilter; #endregion #region Attribute - NameFilter /// <summary> /// Represents a mandatory Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is mandatory and therefore must be populated within the XML. /// It is defaulted to "". /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("NameFilter", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public string NameFilter { get { return m_NameFilter; } set { // Apply whitespace rules appropriately value = LiquidTechnologies.Runtime.WhitespaceUtils.Preserve(value); m_NameFilter = value; } } protected string m_NameFilter; #endregion #region Attribute - Namespace public override string Namespace { get { return ""; } } #endregion #region Attribute - GetBase public override LiquidTechnologies.Runtime.XmlObjectBase GetBase() { return this; } #endregion #endregion // ##HAND_CODED_BLOCK_START ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional Methods and members here... // ##HAND_CODED_BLOCK_END ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } } |
![]() ![]() |
���using System; using System.Xml; /********************************************************************************************** * Copyright (c) 2001-2023 Liquid Technologies Limited. All rights reserved. * See www.liquid-technologies.com for product details. * * Please see products End User License Agreement for distribution permissions. * * WARNING: THIS FILE IS GENERATED * Changes made outside of ##HAND_CODED_BLOCK_START blocks will be overwritten * * Generation : by Liquid XML Data Binder 19.0.14.11049 * Using Schema: MusicStore.xsd **********************************************************************************************/ namespace MusicStoreLib { /// <summary> /// This class represents the Element SearchResponse /// </summary> [LiquidTechnologies.Runtime.XmlObjectInfo(LiquidTechnologies.Runtime.XmlObjectBase.XmlElementGroupType.Choice, LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, "SearchResponse", "", true, false, false)] public partial class SearchResponse : MusicStoreLib.XmlCommonBase { #region Constructors /// <summary> /// Constructor for SearchResponse /// </summary> /// <remarks> /// The class is created with all the mandatory fields populated with the /// default data. /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd /// </remarks> public SearchResponse() { _elementName = "SearchResponse"; Init(); } public SearchResponse(string elementName) { _elementName = elementName; Init(); } #endregion #region Initialization methods for the class /// <summary> /// Initializes the class /// </summary> /// <remarks> /// This creates all the mandatory fields (populated with the default data) /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd. /// </remarks> protected override void Init() { MusicStoreLib.Registration.iRegistrationIndicator = 0; // causes registration to take place m_Result = null; m_Error = null; _validElement = ""; // ##HAND_CODED_BLOCK_START ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional initialization code here... // ##HAND_CODED_BLOCK_END ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } protected void ClearChoice(string selectedElement) { m_Result = null; m_Error = null; _validElement = selectedElement; } #endregion #region ICloneable Interface /// <summary> /// Allows the class to be copied /// </summary> /// <remarks> /// Performs a 'deep copy' of all the data in the class (and its children) /// </remarks> public override object Clone() { MusicStoreLib.SearchResponse newObject = new MusicStoreLib.SearchResponse(_elementName); newObject.m_Result = null; if (m_Result != null) newObject.m_Result = (MusicStoreLib.Result)m_Result.Clone(); newObject.m_Error = null; if (m_Error != null) newObject.m_Error = (MusicStoreLib.Error)m_Error.Clone(); newObject._validElement = _validElement; // ##HAND_CODED_BLOCK_START ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional clone code here... // ##HAND_CODED_BLOCK_END ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS return newObject; } #endregion #region Member variables protected override string TargetNamespace { get { return ""; } } #region Attribute - Result /// <summary> /// Represents an optional Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is optional, initially it is null. /// Only one Element within this class may be set at a time, setting this property when another element is already set will raise an exception. setting this property to null will allow another element to be selected /// </remarks> [LiquidTechnologies.Runtime.ElementInfoChoiceClsOpt("Result", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, typeof(MusicStoreLib.Result))] public MusicStoreLib.Result Result { get { return m_Result; } set { // The class represents a choice, so prevent more than one element from being selected ClearChoice((value == null)?"":"Result"); // remove selection if (value == null) m_Result = null; else { SetElementName(value, "Result"); m_Result = value; } } } protected MusicStoreLib.Result m_Result; #endregion #region Attribute - Error /// <summary> /// Represents an optional Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is optional, initially it is null. /// Only one Element within this class may be set at a time, setting this property when another element is already set will raise an exception. setting this property to null will allow another element to be selected /// </remarks> [LiquidTechnologies.Runtime.ElementInfoChoiceClsOpt("Error", "", LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, typeof(MusicStoreLib.Error))] public MusicStoreLib.Error Error { get { return m_Error; } set { // The class represents a choice, so prevent more than one element from being selected ClearChoice((value == null)?"":"Error"); // remove selection if (value == null) m_Error = null; else { SetElementName(value, "Error"); m_Error = value; } } } protected MusicStoreLib.Error m_Error; #endregion public string ChoiceSelectedElement { get { return _validElement; } } protected string _validElement; #region Attribute - Namespace public override string Namespace { get { return ""; } } #endregion #region Attribute - GetBase public override LiquidTechnologies.Runtime.XmlObjectBase GetBase() { return this; } #endregion #endregion // ##HAND_CODED_BLOCK_START ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional Methods and members here... // ##HAND_CODED_BLOCK_END ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } } |
![]() ![]() |
���using System; using System.Xml; /********************************************************************************************** * Copyright (c) 2001-2023 Liquid Technologies Limited. All rights reserved. * See www.liquid-technologies.com for product details. * * Please see products End User License Agreement for distribution permissions. * * WARNING: THIS FILE IS GENERATED * Changes made outside of ##HAND_CODED_BLOCK_START blocks will be overwritten * * Generation : by Liquid XML Data Binder 19.0.14.11049 * Using Schema: MusicStore.xsd **********************************************************************************************/ namespace MusicStoreLib { /// <summary> /// This class represents the ComplexType TrackType /// </summary> [LiquidTechnologies.Runtime.XmlObjectInfo(LiquidTechnologies.Runtime.XmlObjectBase.XmlElementGroupType.Sequence, LiquidTechnologies.Runtime.XmlObjectBase.XmlElementType.Element, "TrackType", "", true, false, false)] public partial class TrackType : MusicStoreLib.XmlCommonBase { #region Constructors /// <summary> /// Constructor for TrackType /// </summary> /// <remarks> /// The class is created with all the mandatory fields populated with the /// default data. /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd /// </remarks> public TrackType() { _elementName = "TrackType"; Init(); } public TrackType(string elementName) { _elementName = elementName; Init(); } #endregion #region Initialization methods for the class /// <summary> /// Initializes the class /// </summary> /// <remarks> /// This creates all the mandatory fields (populated with the default data) /// All Collection object are created. /// However any 1-n relationships (these are represented as collections) are /// empty. To comply with the schema these must be populated before the xml /// obtained from ToXml is valid against the schema MusicStore.xsd. /// </remarks> protected override void Init() { MusicStoreLib.Registration.iRegistrationIndicator = 0; // causes registration to take place m_Title = ""; m_Length = new LiquidTechnologies.Runtime.XmlDateTimeSpan(); // ##HAND_CODED_BLOCK_START ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional initialization code here... // ##HAND_CODED_BLOCK_END ID="Additional Inits"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } #endregion #region ICloneable Interface /// <summary> /// Allows the class to be copied /// </summary> /// <remarks> /// Performs a 'deep copy' of all the data in the class (and its children) /// </remarks> public override object Clone() { MusicStoreLib.TrackType newObject = new MusicStoreLib.TrackType(_elementName); newObject.m_Title = m_Title; newObject.m_Length = (LiquidTechnologies.Runtime.XmlDateTimeSpan)m_Length.Clone(); // ##HAND_CODED_BLOCK_START ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional clone code here... // ##HAND_CODED_BLOCK_END ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS return newObject; } #endregion #region Member variables protected override string TargetNamespace { get { return ""; } } #region Attribute - Title /// <summary> /// Represents a mandatory Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is mandatory and therefore must be populated within the XML. /// It is defaulted to "". /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("Title", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_string, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Preserve, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public string Title { get { return m_Title; } set { // Apply whitespace rules appropriately value = LiquidTechnologies.Runtime.WhitespaceUtils.Preserve(value); m_Title = value; } } protected string m_Title; #endregion #region Attribute - Length /// <summary> /// Represents a mandatory Element in the XML document /// </summary> /// <remarks> /// This property is represented as an Element in the XML. /// It is mandatory and therefore must be populated within the XML. /// It is defaulted to new LiquidTechnologies.Runtime.XmlDateTimeSpan(). /// </remarks> [LiquidTechnologies.Runtime.ElementInfoSeqPrimMnd("Length", "", null, LiquidTechnologies.Runtime.Conversions.ConversionType.type_duration, null, LiquidTechnologies.Runtime.WhitespaceUtils.WhitespaceRule.Collapse, "", -1, -1, "", "", "", "", -1, -1, -1, null)] public LiquidTechnologies.Runtime.XmlDateTimeSpan Length { get { return m_Length; } set { m_Length = value; } } protected LiquidTechnologies.Runtime.XmlDateTimeSpan m_Length; #endregion #region Attribute - Namespace public override string Namespace { get { return ""; } } #endregion #region Attribute - GetBase public override LiquidTechnologies.Runtime.XmlObjectBase GetBase() { return this; } #endregion #endregion // ##HAND_CODED_BLOCK_START ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS // Add Additional Methods and members here... // ##HAND_CODED_BLOCK_END ID="Additional Methods"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS } } |
Main Menu | Samples List |