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
- Switch.cs
- cache.cs
- DataPagerField.cs
- InputLanguageSource.cs
- XmlSerializerSection.cs
- SqlFactory.cs
- ClientTargetSection.cs
- NeutralResourcesLanguageAttribute.cs
- XmlSchemaSimpleContent.cs
- MergeFailedEvent.cs
- AspNetHostingPermission.cs
- StreamInfo.cs
- KeySplineConverter.cs
- GPStream.cs
- Pens.cs
- ImageListImageEditor.cs
- MdiWindowListItemConverter.cs
- PathNode.cs
- DebugView.cs
- SHA256CryptoServiceProvider.cs
- RuleAction.cs
- PropertyDescriptorGridEntry.cs
- OledbConnectionStringbuilder.cs
- DetailsViewInsertEventArgs.cs
- ConnectionInterfaceCollection.cs
- TextRange.cs
- WebBrowserSiteBase.cs
- DesignUtil.cs
- XhtmlBasicLiteralTextAdapter.cs
- ProfilePropertyNameValidator.cs
- DrawingVisual.cs
- DesignerDataStoredProcedure.cs
- ConstructorNeedsTagAttribute.cs
- Path.cs
- XhtmlBasicPhoneCallAdapter.cs
- DeleteStoreRequest.cs
- XmlSchemaFacet.cs
- TypeConverterHelper.cs
- MsmqHostedTransportManager.cs
- SignalGate.cs
- Block.cs
- SoapFault.cs
- RandomDelayQueuedSendsAsyncResult.cs
- DataControlImageButton.cs
- DbConnectionPoolGroup.cs
- ObjectToIdCache.cs
- FixUp.cs
- ContractSearchPattern.cs
- ErrorCodes.cs
- SigningCredentials.cs
- SqlBulkCopyColumnMappingCollection.cs
- HostedHttpRequestAsyncResult.cs
- Perspective.cs
- BitStream.cs
- PlainXmlSerializer.cs
- XmlDictionaryWriter.cs
- TargetFrameworkUtil.cs
- ClientOperation.cs
- MD5CryptoServiceProvider.cs
- CommonObjectSecurity.cs
- CollectionEditVerbManager.cs
- ValidationErrorCollection.cs
- WindowsEditBoxRange.cs
- UIElementAutomationPeer.cs
- DependencyStoreSurrogate.cs
- Parsers.cs
- RtfFormatStack.cs
- AddDataControlFieldDialog.cs
- _BufferOffsetSize.cs
- StringComparer.cs
- EnumBuilder.cs
- ReturnEventArgs.cs
- StandardToolWindows.cs
- TableCellCollection.cs
- OdbcTransaction.cs
- UnsettableComboBox.cs
- ReflectionUtil.cs
- ObjectDataSourceMethodEventArgs.cs
- MeshGeometry3D.cs
- ADConnectionHelper.cs
- UnionCqlBlock.cs
- BuildProvidersCompiler.cs
- CodeMemberProperty.cs
- SocketStream.cs
- ToolStripRenderer.cs
- Int32RectConverter.cs
- DefaultShape.cs
- CreateParams.cs
- XmlDataSourceNodeDescriptor.cs
- ExpressionConverter.cs
- SurrogateEncoder.cs
- SQLDoubleStorage.cs
- HideDisabledControlAdapter.cs
- PrivilegedConfigurationManager.cs
- ListViewHitTestInfo.cs
- IdentityHolder.cs
- Trace.cs
- Walker.cs
- SerializableAttribute.cs
- Visual3DCollection.cs