예제 #1
0
        private void ReadChangeDetectionItem(XmlReader xmlReader, double dtdVersion, string Name)
        {
            // Read the change detection items
            ONChangeDetectionInfo lCD;

            try
            {
                lCD = (ONChangeDetectionInfo)mChangesDetectionList[Name.ToLower()];
                if (lCD == null)
                {
                    xmlReader.Skip();
                    return;
                }
            }
            catch
            {
                return;
            }

            switch (lCD.Type)
            {
            case DataTypeEnumerator.Autonumeric:
            {
                lCD.OldValue = ONXmlAutonumeric.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Bool:
            {
                lCD.OldValue = ONXmlBool.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Blob:
            {
                lCD.OldValue = ONXmlBlob.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Date:
            {
                lCD.OldValue = ONXmlDate.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.DateTime:
            {
                lCD.OldValue = ONXmlDateTime.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Int:
            {
                lCD.OldValue = ONXmlInt.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Nat:
            {
                lCD.OldValue = ONXmlNat.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Password:
            {
                lCD.OldValue = ONXmlPassword.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Real:
            {
                lCD.OldValue = ONXmlReal.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.String:
            {
                lCD.OldValue = ONXmlString.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Text:
            {
                lCD.OldValue = ONXmlText.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Time:
            {
                lCD.OldValue = ONXmlTime.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.OID:
            {
                object[] lArgs = new object[2];
                lArgs[0]     = xmlReader;
                lArgs[1]     = dtdVersion;
                lCD.OldValue = ONContext.InvoqueMethod(ONContext.GetType_XML(lCD.ClassName), "XML2ON", lArgs) as IONType;
                break;
            }
            }
        }
예제 #2
0
        private void ReadArgument(XmlReader xmlReader, double dtdVersion, string Name)
        {
            // Read the arguments and process
            ONArgumentInfo lArg;

            try
            {
                lArg = (ONArgumentInfo)mArgumentList[Name.ToLower()];
            }
            catch
            {
                return;
            }

            switch (lArg.Type)
            {
            case DataTypeEnumerator.Autonumeric:
            {
                lArg.Value = ONXmlAutonumeric.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Bool:
            {
                lArg.Value = ONXmlBool.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Blob:
            {
                lArg.Value = ONXmlBlob.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Date:
            {
                lArg.Value = ONXmlDate.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.DateTime:
            {
                lArg.Value = ONXmlDateTime.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Int:
            {
                lArg.Value = ONXmlInt.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Nat:
            {
                lArg.Value = ONXmlNat.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Password:
            {
                lArg.Value = ONXmlPassword.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Real:
            {
                lArg.Value = ONXmlReal.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.String:
            {
                lArg.Value = ONXmlString.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Text:
            {
                lArg.Value = ONXmlText.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.Time:
            {
                lArg.Value = ONXmlTime.XML2ON(xmlReader, dtdVersion, ONXml.XMLTAG_LITERAL);
                break;
            }

            case DataTypeEnumerator.OID:
            {
                object[] lArgs = new object[2];
                lArgs[0]   = xmlReader;
                lArgs[1]   = dtdVersion;
                lArg.Value = ONContext.InvoqueMethod(ONContext.GetType_XML(lArg.ClassName), "XML2ON", lArgs) as IONType;
                break;
            }
            }
        }