Beispiel #1
0
        /// <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()
        {
            ns51.Fact newObject = new ns51.Fact(_elementName);
            newObject.m_ID           = m_ID;
            newObject.m_OSZCode      = m_OSZCode;
            newObject.m_MSZ_receiver = null;
            if (m_MSZ_receiver != null)
            {
                newObject.m_MSZ_receiver = (schemaEgisso.MSZ_receiver)m_MSZ_receiver.Clone();
            }
            newObject.m_Reason_persons = null;
            if (m_Reason_persons != null)
            {
                newObject.m_Reason_persons = (schemaEgisso.Reason_persons)m_Reason_persons.Clone();
            }
            newObject.m_LMSZID        = m_LMSZID;
            newObject.m_CategoryID    = m_CategoryID;
            newObject.m_Decision_date = (LiquidTechnologies.Runtime.Net40.XmlDateTime)m_Decision_date.Clone();
            newObject.m_DateStart     = (LiquidTechnologies.Runtime.Net40.XmlDateTime)m_DateStart.Clone();
            newObject.m_DateFinish    = (LiquidTechnologies.Runtime.Net40.XmlDateTime)m_DateFinish.Clone();
            newObject.m_NeedsCriteria = null;
            if (m_NeedsCriteria != null)
            {
                newObject.m_NeedsCriteria = (schemaEgisso.NeedsCriteria)m_NeedsCriteria.Clone();
            }
            newObject.m_Assignment_info = null;
            if (m_Assignment_info != null)
            {
                newObject.m_Assignment_info = (schemaEgisso.Assignment_info)m_Assignment_info.Clone();
            }
            newObject.m_LastChanging = (LiquidTechnologies.Runtime.Net40.XmlDateTime)m_LastChanging.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);
        }
Beispiel #2
0
        /// <summary>
        /// Creates an object from an XML Element.
        /// </summary>
        /// <param name="xmlParent">The data that needs loading</param>
        /// <param name="context">The context to use when loading the data</param>
        /// <returns>The wrapper object, loaded with the supplied data</returns>
        /// <remarks>Throws an exception if the XML data is not compatable with the schema</remarks>
        static public LiquidTechnologies.Runtime.Net40.XmlObjectBase FromXmlElement(XmlElement xmlParent, LiquidTechnologies.Runtime.Net40.XmlSerializationContext context)
        {
            LiquidTechnologies.Runtime.Net40.XmlObjectBase retVal = null;
            String elementName;
            String elementNamespaceUri;


            // Get the type name this is either
            // from the element ie <Parent>... = Parent
            // or from the type ie <Parent xsi:type="someNS:SomeElement">... = SomeElement
            if (GetElementType(xmlParent) == "")
            {
                elementName         = xmlParent.LocalName;
                elementNamespaceUri = xmlParent.NamespaceURI;
            }
            else
            {
                elementName         = GetElementType(xmlParent);
                elementNamespaceUri = GetElementTypeNamespaceUri(xmlParent);
            }

            // create the appropriate object
            if (elementName == null || elementName == String.Empty)
            {
                throw new LiquidTechnologies.Runtime.Net40.LtInvalidParamException("The element to load has no name");
            }
            else if (elementName == "assignment_info" && elementNamespaceUri == "")
            {
                retVal = new schemaEgisso.Assignment_info();
            }
            else if (elementName == "assignment_info" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.Assignment_info();
            }
            else if (elementName == "BirthCertificate" && elementNamespaceUri == "")
            {
                retVal = new schemaEgisso.BirthCertificate();
            }
            else if (elementName == "BirthCertificate" && elementNamespaceUri == "urn://egisso-ru/types/basic/1.0.4")
            {
                retVal = new ns54.BirthCertificate();
            }
            else if (elementName == "BirthDate" && elementNamespaceUri == "urn://egisso-ru/types/prsn-info/1.0.3")
            {
                retVal = new ns53.BirthDate();
            }
            else if (elementName == "categoryID" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.CategoryID();
            }
            else if (elementName == "data" && elementNamespaceUri == "urn://egisso-ru/msg/10.06.S/1.0.2")
            {
                retVal = new ns55.Data();
            }
            else if (elementName == "dateFinish" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.DateFinish();
            }
            else if (elementName == "dateStart" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.DateStart();
            }
            else if (elementName == "decision_date" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.Decision_date();
            }
            else if (elementName == "elements" && elementNamespaceUri == "urn://egisso-ru/types/package-RAF/1.0.3")
            {
                retVal = new ns51.Elements();
            }
            else if (elementName == "fact" && elementNamespaceUri == "urn://egisso-ru/types/package-RAF/1.0.3")
            {
                retVal = new ns51.Fact();
            }
            else if (elementName == "FamilyName" && elementNamespaceUri == "urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1")
            {
                retVal = new ns33.FamilyName();
            }
            else if (elementName == "FirstName" && elementNamespaceUri == "urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1")
            {
                retVal = new ns33.FirstName();
            }
            else if (elementName == "Gender" && elementNamespaceUri == "urn://egisso-ru/types/prsn-info/1.0.3")
            {
                retVal = new ns53.Gender();
            }
            else if (elementName == "ID" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.ID();
            }
            else if (elementName == "IdentityDoc" && elementNamespaceUri == "")
            {
                retVal = new schemaEgisso.IdentityDoc();
            }
            else if (elementName == "IdentityDoc" && elementNamespaceUri == "urn://egisso-ru/types/prsn-info/1.0.3")
            {
                retVal = new ns53.IdentityDoc();
            }
            else if (elementName == "IdentityDoc" && elementNamespaceUri == "urn://egisso-ru/types/prsn-info/1.0.3")
            {
                retVal = new ns53.IdentityDocA();
            }
            else if (elementName == "LMSZID" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.LMSZID();
            }
            else if (elementName == "monetary_form" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.Monetary_form();
            }
            else if (elementName == "MSZ_receiver" && elementNamespaceUri == "")
            {
                retVal = new schemaEgisso.MSZ_receiver();
            }
            else if (elementName == "MSZ_receiver" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.MSZ_receiver();
            }
            else if (elementName == "needsCriteria" && elementNamespaceUri == "")
            {
                retVal = new schemaEgisso.NeedsCriteria();
            }
            else if (elementName == "needsCriteria" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.NeedsCriteria();
            }
            else if (elementName == "OSZCode" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.OSZCode();
            }
            else if (elementName == "package" && elementNamespaceUri == "")
            {
                retVal = new schemaEgisso.Package();
            }
            else if (elementName == "package" && elementNamespaceUri == "urn://egisso-ru/types/package-RAF/1.0.3")
            {
                retVal = new ns51.Package();
            }
            else if (elementName == "PassportRF" && elementNamespaceUri == "")
            {
                retVal = new schemaEgisso.PassportRF();
            }
            else if (elementName == "PassportRF" && elementNamespaceUri == "urn://egisso-ru/types/basic/1.0.4")
            {
                retVal = new ns54.PassportRF();
            }
            else if (elementName == "Patronymic" && elementNamespaceUri == "urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1")
            {
                retVal = new ns33.Patronymic();
            }
            else if (elementName == "prsnInfo" && elementNamespaceUri == "")
            {
                retVal = new schemaEgisso.PrsnInfo();
            }
            else if (elementName == "prsnInfo" && elementNamespaceUri == "urn://egisso-ru/types/prsn-info/1.0.3")
            {
                retVal = new ns53.PrsnInfo();
            }
            else if (elementName == "reason_persons" && elementNamespaceUri == "")
            {
                retVal = new schemaEgisso.Reason_persons();
            }
            else if (elementName == "reason_persons" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.Reason_persons();
            }
            else if (elementName == "serviceForm" && elementNamespaceUri == "urn://egisso-ru/types/assignment-fact/1.0.3")
            {
                retVal = new ns52.ServiceForm();
            }
            else if (elementName == "SNILS" && elementNamespaceUri == "urn://egisso-ru/types/prsn-info/1.0.3")
            {
                retVal = new ns53.SNILS();
            }
            else
            {
                throw new LiquidTechnologies.Runtime.Net40.LtException(
                          string.Format("Failed load the element {0}:{1}. No appropriate class exists to load the data into. Ensure that the XML document complies with the schema.",
                                        xmlParent.Name, xmlParent.NamespaceURI));
            }

            // load the data into the object
            retVal.FromXmlElement(xmlParent, context);

            return(retVal);
        }