Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Serialization / System / Runtime / Serialization / DictionaryGlobals.cs / 1305376 / DictionaryGlobals.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Runtime.Serialization { using System; using System.Xml; [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Static fields are marked SecurityCritical or readonly to prevent" + " data from being modified or leaked to other components in appdomain." + " Changes to static fields could affect serialization/deserialization; should be reviewed.")] #if USE_REFEMIT public static class DictionaryGlobals #else internal static class DictionaryGlobals #endif { public readonly static XmlDictionaryString EmptyString; public readonly static XmlDictionaryString SchemaInstanceNamespace; public readonly static XmlDictionaryString SchemaNamespace; public readonly static XmlDictionaryString SerializationNamespace; public readonly static XmlDictionaryString XmlnsNamespace; public readonly static XmlDictionaryString XsiTypeLocalName; public readonly static XmlDictionaryString XsiNilLocalName; public readonly static XmlDictionaryString ClrTypeLocalName; public readonly static XmlDictionaryString ClrAssemblyLocalName; public readonly static XmlDictionaryString ArraySizeLocalName; public readonly static XmlDictionaryString IdLocalName; public readonly static XmlDictionaryString RefLocalName; public readonly static XmlDictionaryString ISerializableFactoryTypeLocalName; public readonly static XmlDictionaryString CharLocalName; public readonly static XmlDictionaryString BooleanLocalName; public readonly static XmlDictionaryString SignedByteLocalName; public readonly static XmlDictionaryString UnsignedByteLocalName; public readonly static XmlDictionaryString ShortLocalName; public readonly static XmlDictionaryString UnsignedShortLocalName; public readonly static XmlDictionaryString IntLocalName; public readonly static XmlDictionaryString UnsignedIntLocalName; public readonly static XmlDictionaryString LongLocalName; public readonly static XmlDictionaryString UnsignedLongLocalName; public readonly static XmlDictionaryString FloatLocalName; public readonly static XmlDictionaryString DoubleLocalName; public readonly static XmlDictionaryString DecimalLocalName; public readonly static XmlDictionaryString DateTimeLocalName; public readonly static XmlDictionaryString StringLocalName; public readonly static XmlDictionaryString ByteArrayLocalName; public readonly static XmlDictionaryString ObjectLocalName; public readonly static XmlDictionaryString TimeSpanLocalName; public readonly static XmlDictionaryString GuidLocalName; public readonly static XmlDictionaryString UriLocalName; public readonly static XmlDictionaryString QNameLocalName; public readonly static XmlDictionaryString Space; public readonly static XmlDictionaryString timeLocalName; public readonly static XmlDictionaryString dateLocalName; public readonly static XmlDictionaryString hexBinaryLocalName; public readonly static XmlDictionaryString gYearMonthLocalName; public readonly static XmlDictionaryString gYearLocalName; public readonly static XmlDictionaryString gMonthDayLocalName; public readonly static XmlDictionaryString gDayLocalName; public readonly static XmlDictionaryString gMonthLocalName; public readonly static XmlDictionaryString integerLocalName; public readonly static XmlDictionaryString positiveIntegerLocalName; public readonly static XmlDictionaryString negativeIntegerLocalName; public readonly static XmlDictionaryString nonPositiveIntegerLocalName; public readonly static XmlDictionaryString nonNegativeIntegerLocalName; public readonly static XmlDictionaryString normalizedStringLocalName; public readonly static XmlDictionaryString tokenLocalName; public readonly static XmlDictionaryString languageLocalName; public readonly static XmlDictionaryString NameLocalName; public readonly static XmlDictionaryString NCNameLocalName; public readonly static XmlDictionaryString XSDIDLocalName; public readonly static XmlDictionaryString IDREFLocalName; public readonly static XmlDictionaryString IDREFSLocalName; public readonly static XmlDictionaryString ENTITYLocalName; public readonly static XmlDictionaryString ENTITIESLocalName; public readonly static XmlDictionaryString NMTOKENLocalName; public readonly static XmlDictionaryString NMTOKENSLocalName; public readonly static XmlDictionaryString AsmxTypesNamespace; 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); ISerializableFactoryTypeLocalName = dictionary.Add(Globals.ISerializableFactoryTypeLocalName); // 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); // 35 timeLocalName = dictionary.Add("time"); dateLocalName = dictionary.Add("date"); hexBinaryLocalName = dictionary.Add("hexBinary"); gYearMonthLocalName = dictionary.Add("gYearMonth"); gYearLocalName = dictionary.Add("gYear"); // 40 gMonthDayLocalName = dictionary.Add("gMonthDay"); gDayLocalName = dictionary.Add("gDay"); gMonthLocalName = dictionary.Add("gMonth"); integerLocalName = dictionary.Add("integer"); positiveIntegerLocalName = dictionary.Add("positiveInteger"); // 45 negativeIntegerLocalName = dictionary.Add("negativeInteger"); nonPositiveIntegerLocalName = dictionary.Add("nonPositiveInteger"); nonNegativeIntegerLocalName = dictionary.Add("nonNegativeInteger"); normalizedStringLocalName = dictionary.Add("normalizedString"); tokenLocalName = dictionary.Add("token"); // 50 languageLocalName = dictionary.Add("language"); NameLocalName = dictionary.Add("Name"); NCNameLocalName = dictionary.Add("NCName"); XSDIDLocalName = dictionary.Add("ID"); IDREFLocalName = dictionary.Add("IDREF"); // 55 IDREFSLocalName = dictionary.Add("IDREFS"); ENTITYLocalName = dictionary.Add("ENTITY"); ENTITIESLocalName = dictionary.Add("ENTITIES"); NMTOKENLocalName = dictionary.Add("NMTOKEN"); NMTOKENSLocalName = dictionary.Add("NMTOKENS"); // 60 AsmxTypesNamespace = dictionary.Add("http://microsoft.com/wsdl/types/"); // Add new templates here } catch (Exception ex) { if (Fx.IsFatal(ex)) { throw; } throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(ex.Message, ex); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XsdCachingReader.cs
- AppDomainUnloadedException.cs
- _FtpControlStream.cs
- RefreshEventArgs.cs
- XmlTypeAttribute.cs
- FirstQueryOperator.cs
- StringUtil.cs
- EdmMember.cs
- ObjectConverter.cs
- indexingfiltermarshaler.cs
- DesignerAdRotatorAdapter.cs
- TdsParameterSetter.cs
- AddDataControlFieldDialog.cs
- ApplicationServicesHostFactory.cs
- EntityContainerAssociationSet.cs
- PatternMatcher.cs
- FilterQuery.cs
- PlanCompilerUtil.cs
- RepeaterDesigner.cs
- RemoteDebugger.cs
- AuthenticateEventArgs.cs
- TextProperties.cs
- FactoryGenerator.cs
- PrePostDescendentsWalker.cs
- AssociationType.cs
- arclist.cs
- Signature.cs
- StylusPointCollection.cs
- WhereQueryOperator.cs
- RootBuilder.cs
- InternalBufferOverflowException.cs
- LayoutInformation.cs
- GeneralTransform.cs
- Hex.cs
- SafeEventHandle.cs
- SqlConnectionPoolProviderInfo.cs
- GAC.cs
- ping.cs
- AngleUtil.cs
- FixedTextContainer.cs
- CustomErrorCollection.cs
- ReadOnlyHierarchicalDataSource.cs
- System.Data.OracleClient_BID.cs
- FacetDescriptionElement.cs
- Literal.cs
- ComboBoxItem.cs
- ObjectAnimationUsingKeyFrames.cs
- DynamicField.cs
- ImmutableAssemblyCacheEntry.cs
- SQLGuidStorage.cs
- IPEndPointCollection.cs
- NetworkInformationException.cs
- IISMapPath.cs
- HwndAppCommandInputProvider.cs
- WebControlAdapter.cs
- IndexOutOfRangeException.cs
- COM2ComponentEditor.cs
- Vector3dCollection.cs
- RectangleConverter.cs
- RemoteHelper.cs
- PeerService.cs
- PassportPrincipal.cs
- InternalDuplexChannelFactory.cs
- CodeValidator.cs
- ExceptionUtil.cs
- NumberAction.cs
- BlobPersonalizationState.cs
- StylusPlugin.cs
- ThreadAttributes.cs
- HttpCacheVary.cs
- ByteStack.cs
- WindowsIdentity.cs
- UserUseLicenseDictionaryLoader.cs
- DictionaryEntry.cs
- MobileControlsSectionHandler.cs
- ProfileModule.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- WebColorConverter.cs
- AssertUtility.cs
- IPHostEntry.cs
- ELinqQueryState.cs
- BrushMappingModeValidation.cs
- BooleanSwitch.cs
- CommonProperties.cs
- CachedBitmap.cs
- InvokeHandlers.cs
- DiscreteKeyFrames.cs
- WpfKnownMember.cs
- ProcessHostConfigUtils.cs
- ScriptIgnoreAttribute.cs
- CompiledXpathExpr.cs
- ByeMessageApril2005.cs
- CompoundFileStorageReference.cs
- ApplicationTrust.cs
- BitmapFrameDecode.cs
- ReadOnlyDataSourceView.cs
- HttpContextWrapper.cs
- InheritanceRules.cs
- UserNamePasswordValidator.cs
- _CookieModule.cs