Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / OutKeywords.cs / 1305376 / OutKeywords.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.Diagnostics; using System.Xml; internal class OutKeywords { #if DEBUG XmlNameTable _NameTable; #endif internal OutKeywords(XmlNameTable nameTable) { Debug.Assert(nameTable != null); #if DEBUG _NameTable = nameTable; #endif _AtomEmpty = nameTable.Add(string.Empty); _AtomLang = nameTable.Add("lang"); _AtomSpace = nameTable.Add("space"); _AtomXmlns = nameTable.Add("xmlns"); _AtomXml = nameTable.Add("xml"); _AtomXmlNamespace = nameTable.Add(XmlReservedNs.NsXml); _AtomXmlnsNamespace = nameTable.Add(XmlReservedNs.NsXmlNs); CheckKeyword(_AtomEmpty); CheckKeyword(_AtomLang); CheckKeyword(_AtomSpace); CheckKeyword(_AtomXmlns); CheckKeyword(_AtomXml); CheckKeyword(_AtomXmlNamespace); CheckKeyword(_AtomXmlnsNamespace); } private string _AtomEmpty; private string _AtomLang; private string _AtomSpace; private string _AtomXmlns; private string _AtomXml; private string _AtomXmlNamespace; private string _AtomXmlnsNamespace; internal string Empty { get { CheckKeyword(_AtomEmpty); return _AtomEmpty; } } internal string Lang { get { CheckKeyword(_AtomLang); return _AtomLang; } } internal string Space { get { CheckKeyword(_AtomSpace); return _AtomSpace; } } internal string Xmlns { get { CheckKeyword(_AtomXmlns); return _AtomXmlns; } } internal string Xml { get { CheckKeyword(_AtomXml); return _AtomXml; } } internal string XmlNamespace { get { CheckKeyword(_AtomXmlNamespace); return _AtomXmlNamespace; // http://www.w3.org/XML/1998/namespace } } internal string XmlnsNamespace { get { CheckKeyword(_AtomXmlnsNamespace); return _AtomXmlnsNamespace; // http://www.w3.org/XML/2000/xmlns } } [System.Diagnostics.Conditional("DEBUG")] private void CheckKeyword(string keyword) { #if DEBUG Debug.Assert(keyword != null); Debug.Assert((object) keyword == (object) _NameTable.Get(keyword)); #endif } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.Diagnostics; using System.Xml; internal class OutKeywords { #if DEBUG XmlNameTable _NameTable; #endif internal OutKeywords(XmlNameTable nameTable) { Debug.Assert(nameTable != null); #if DEBUG _NameTable = nameTable; #endif _AtomEmpty = nameTable.Add(string.Empty); _AtomLang = nameTable.Add("lang"); _AtomSpace = nameTable.Add("space"); _AtomXmlns = nameTable.Add("xmlns"); _AtomXml = nameTable.Add("xml"); _AtomXmlNamespace = nameTable.Add(XmlReservedNs.NsXml); _AtomXmlnsNamespace = nameTable.Add(XmlReservedNs.NsXmlNs); CheckKeyword(_AtomEmpty); CheckKeyword(_AtomLang); CheckKeyword(_AtomSpace); CheckKeyword(_AtomXmlns); CheckKeyword(_AtomXml); CheckKeyword(_AtomXmlNamespace); CheckKeyword(_AtomXmlnsNamespace); } private string _AtomEmpty; private string _AtomLang; private string _AtomSpace; private string _AtomXmlns; private string _AtomXml; private string _AtomXmlNamespace; private string _AtomXmlnsNamespace; internal string Empty { get { CheckKeyword(_AtomEmpty); return _AtomEmpty; } } internal string Lang { get { CheckKeyword(_AtomLang); return _AtomLang; } } internal string Space { get { CheckKeyword(_AtomSpace); return _AtomSpace; } } internal string Xmlns { get { CheckKeyword(_AtomXmlns); return _AtomXmlns; } } internal string Xml { get { CheckKeyword(_AtomXml); return _AtomXml; } } internal string XmlNamespace { get { CheckKeyword(_AtomXmlNamespace); return _AtomXmlNamespace; // http://www.w3.org/XML/1998/namespace } } internal string XmlnsNamespace { get { CheckKeyword(_AtomXmlnsNamespace); return _AtomXmlnsNamespace; // http://www.w3.org/XML/2000/xmlns } } [System.Diagnostics.Conditional("DEBUG")] private void CheckKeyword(string keyword) { #if DEBUG Debug.Assert(keyword != null); Debug.Assert((object) keyword == (object) _NameTable.Get(keyword)); #endif } } } // 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
- Size3D.cs
- XsdDateTime.cs
- BitmapEncoder.cs
- LoginName.cs
- SQLByteStorage.cs
- LingerOption.cs
- MetadataArtifactLoaderCompositeResource.cs
- DataRelationCollection.cs
- WebControlAdapter.cs
- WebPartCancelEventArgs.cs
- UnwrappedTypesXmlSerializerManager.cs
- UIElement.cs
- SiteMapNode.cs
- ConfigPathUtility.cs
- UniqueID.cs
- SpoolingTask.cs
- OpenFileDialog.cs
- MetadataItemEmitter.cs
- CharacterHit.cs
- VirtualDirectoryMapping.cs
- IIS7UserPrincipal.cs
- CfgParser.cs
- RangeValueProviderWrapper.cs
- DataSourceProvider.cs
- DisplayInformation.cs
- ArrayConverter.cs
- BindingsCollection.cs
- FontStretches.cs
- PlatformNotSupportedException.cs
- _ConnectionGroup.cs
- ConfigurationValues.cs
- DirectionalLight.cs
- ComplexPropertyEntry.cs
- HelpFileFileNameEditor.cs
- RegexMatchCollection.cs
- MessageQueueException.cs
- NativeMethods.cs
- DetailsViewInsertEventArgs.cs
- Size3DValueSerializer.cs
- DataGridViewCellValidatingEventArgs.cs
- SQLBytes.cs
- CircleHotSpot.cs
- ConfigurationStrings.cs
- EntityTypeBase.cs
- ObjectCache.cs
- SpecialFolderEnumConverter.cs
- BooleanFunctions.cs
- XmlDeclaration.cs
- RequestCachingSection.cs
- BitmapSizeOptions.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- ServiceNotStartedException.cs
- SchemaElementLookUpTableEnumerator.cs
- MeasurementDCInfo.cs
- BaseTemplateCodeDomTreeGenerator.cs
- Group.cs
- ConnectionConsumerAttribute.cs
- WindowsAuthenticationEventArgs.cs
- SoapAttributeOverrides.cs
- XamlStyleSerializer.cs
- GlyphingCache.cs
- XPathNodeIterator.cs
- ServiceEndpointElementCollection.cs
- ApplicationBuildProvider.cs
- EventSchemaTraceListener.cs
- ObjectDataSourceMethodEventArgs.cs
- NoPersistScope.cs
- TlsnegoTokenProvider.cs
- FirstMatchCodeGroup.cs
- OracleConnectionString.cs
- SamlDoNotCacheCondition.cs
- LinkUtilities.cs
- dsa.cs
- XamlGridLengthSerializer.cs
- ProvidePropertyAttribute.cs
- GridViewDeletedEventArgs.cs
- WebResourceUtil.cs
- ComPlusAuthorization.cs
- HtmlElement.cs
- RepeaterItemCollection.cs
- ProcessModule.cs
- MiniParameterInfo.cs
- Ray3DHitTestResult.cs
- Registry.cs
- StringAnimationBase.cs
- CodeParameterDeclarationExpression.cs
- MethodBuilderInstantiation.cs
- MembershipPasswordException.cs
- PackageRelationship.cs
- BrowserCapabilitiesFactory.cs
- FilterRepeater.cs
- FaultPropagationQuery.cs
- PointLight.cs
- ModuleElement.cs
- ConstantSlot.cs
- CheckBoxRenderer.cs
- StringSource.cs
- FixedDocumentSequencePaginator.cs
- ValueUnavailableException.cs
- ObjectStateManager.cs