internal virtual void InternalWriteEndObject(XmlWriterDelegator writer)
 {
     DiagnosticUtility.DebugAssert("XmlObjectSerializer.InternalWriteEndObject should never get called");
     throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException());
 }
 internal virtual bool InternalIsStartObject(XmlReaderDelegator reader)
 {
     DiagnosticUtility.DebugAssert("XmlObjectSerializer.InternalIsStartObject should never get called");
     throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException());
 }
Example #3
0
        static DictionaryGlobals()
        {
            // Update array size when adding new strings or templates
            XmlDictionary dictionary = new XmlDictionary(61);

            try
            {
                // 0
                SchemaInstanceNamespace = dictionary.Add(Globals.SchemaInstanceNamespace);
                SerializationNamespace  = dictionary.Add(Globals.SerializationNamespace);
                SchemaNamespace         = dictionary.Add(Globals.SchemaNamespace);
                XsiTypeLocalName        = dictionary.Add(Globals.XsiTypeLocalName);
                XsiNilLocalName         = dictionary.Add(Globals.XsiNilLocalName);

                // 5
                IdLocalName        = dictionary.Add(Globals.IdLocalName);
                RefLocalName       = dictionary.Add(Globals.RefLocalName);
                ArraySizeLocalName = dictionary.Add(Globals.ArraySizeLocalName);
                EmptyString        = dictionary.Add(String.Empty);
                // 10
                XmlnsNamespace        = dictionary.Add(Globals.XmlnsNamespace);
                CharLocalName         = dictionary.Add("char");
                BooleanLocalName      = dictionary.Add("boolean");
                SignedByteLocalName   = dictionary.Add("byte");
                UnsignedByteLocalName = dictionary.Add("unsignedByte");

                // 15
                ShortLocalName         = dictionary.Add("short");
                UnsignedShortLocalName = dictionary.Add("unsignedShort");
                IntLocalName           = dictionary.Add("int");
                UnsignedIntLocalName   = dictionary.Add("unsignedInt");
                LongLocalName          = dictionary.Add("long");

                // 20
                UnsignedLongLocalName = dictionary.Add("unsignedLong");
                FloatLocalName        = dictionary.Add("float");
                DoubleLocalName       = dictionary.Add("double");
                DecimalLocalName      = dictionary.Add("decimal");
                DateTimeLocalName     = dictionary.Add("dateTime");

                // 25
                StringLocalName    = dictionary.Add("string");
                ByteArrayLocalName = dictionary.Add("base64Binary");
                ObjectLocalName    = dictionary.Add("anyType");
                TimeSpanLocalName  = dictionary.Add("duration");
                GuidLocalName      = dictionary.Add("guid");

                // 30
                UriLocalName         = dictionary.Add("anyURI");
                QNameLocalName       = dictionary.Add("QName");
                ClrTypeLocalName     = dictionary.Add(Globals.ClrTypeLocalName);
                ClrAssemblyLocalName = dictionary.Add(Globals.ClrAssemblyLocalName);
                Space = dictionary.Add(Globals.Space);

                hexBinaryLocalName = dictionary.Add("hexBinary");
                // Add new templates here
            }
            catch (Exception ex)
            {
                if (DiagnosticUtility.IsFatal(ex))
                {
                    throw;
                }
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(ex.Message, ex);
            }
        }