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
- GlobalizationSection.cs
- SqlDataSourceConnectionPanel.cs
- RecognizedAudio.cs
- StrokeNodeEnumerator.cs
- ISAPIRuntime.cs
- CellNormalizer.cs
- SafeNativeMethods.cs
- MonikerBuilder.cs
- EdmItemError.cs
- ToolboxItemCollection.cs
- VariableQuery.cs
- UpdateTranslator.cs
- SemanticBasicElement.cs
- ActiveDocumentEvent.cs
- ObsoleteAttribute.cs
- CodeAccessPermission.cs
- MetafileEditor.cs
- OleDbSchemaGuid.cs
- StringKeyFrameCollection.cs
- BitStack.cs
- ThrowHelper.cs
- XpsS0ValidatingLoader.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- Vector3DConverter.cs
- _SafeNetHandles.cs
- XmlSignatureProperties.cs
- StylusPointPropertyInfoDefaults.cs
- BuildProvider.cs
- ConstructorArgumentAttribute.cs
- ObjectDesignerDataSourceView.cs
- COM2IPerPropertyBrowsingHandler.cs
- GetTokenRequest.cs
- ZipIOExtraFieldElement.cs
- ExecutionEngineException.cs
- BaseHashHelper.cs
- IgnoreFlushAndCloseStream.cs
- ExtensibleSyndicationObject.cs
- PageAsyncTask.cs
- Size3DValueSerializer.cs
- GridSplitterAutomationPeer.cs
- PointLight.cs
- TagNameToTypeMapper.cs
- Privilege.cs
- CodeGroup.cs
- hresults.cs
- ResourceManager.cs
- WorkflowCommandExtensionItem.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- EntityDataSourceReferenceGroup.cs
- CodeTypeReferenceExpression.cs
- HorizontalAlignConverter.cs
- ArithmeticException.cs
- StringAnimationBase.cs
- LogLogRecordHeader.cs
- RelAssertionDirectKeyIdentifierClause.cs
- SessionStateUtil.cs
- Tuple.cs
- DbUpdateCommandTree.cs
- AtomParser.cs
- WebBrowserUriTypeConverter.cs
- DrawingState.cs
- ToolStripCustomTypeDescriptor.cs
- TemplateComponentConnector.cs
- StaticExtensionConverter.cs
- DataGridViewCellCancelEventArgs.cs
- ToolTip.cs
- IgnoreFileBuildProvider.cs
- ZipFileInfoCollection.cs
- XsltException.cs
- HyperLinkStyle.cs
- Header.cs
- HttpAsyncResult.cs
- SoundPlayerAction.cs
- HttpModuleActionCollection.cs
- SafeNativeMemoryHandle.cs
- TraceListeners.cs
- HttpHandlerActionCollection.cs
- UpDownEvent.cs
- TempEnvironment.cs
- LocatorPartList.cs
- BooleanExpr.cs
- UndoEngine.cs
- EntityReference.cs
- UnsafePeerToPeerMethods.cs
- DragDeltaEventArgs.cs
- DBSchemaTable.cs
- BlurEffect.cs
- XmlSchemaSubstitutionGroup.cs
- ISessionStateStore.cs
- MultiBinding.cs
- DbFunctionCommandTree.cs
- Viewport3DVisual.cs
- TimerEventSubscriptionCollection.cs
- BitmapEffectrendercontext.cs
- AttributeAction.cs
- Bitmap.cs
- Figure.cs
- TextCompositionManager.cs
- RegexCharClass.cs
- PropertyPushdownHelper.cs