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
- UnitySerializationHolder.cs
- Currency.cs
- Byte.cs
- URL.cs
- DetailsViewDeleteEventArgs.cs
- DesigntimeLicenseContextSerializer.cs
- WebPartTransformerCollection.cs
- ContextProperty.cs
- PointHitTestResult.cs
- ScriptDescriptor.cs
- CommittableTransaction.cs
- NativeMethods.cs
- AlignmentYValidation.cs
- PointConverter.cs
- MetadataSource.cs
- StreamInfo.cs
- ColumnResizeUndoUnit.cs
- GridViewColumnCollectionChangedEventArgs.cs
- AlignmentYValidation.cs
- Win32.cs
- WebScriptEndpointElement.cs
- GetWinFXPath.cs
- SecurityUtils.cs
- ParameterToken.cs
- _NativeSSPI.cs
- SqlInfoMessageEvent.cs
- MsmqTransportReceiveParameters.cs
- AbstractSvcMapFileLoader.cs
- PowerEase.cs
- BamlMapTable.cs
- Events.cs
- RectAnimationClockResource.cs
- LicenseException.cs
- ParallelEnumerable.cs
- EntityDataSourceEntitySetNameItem.cs
- NumericUpDown.cs
- Serializer.cs
- PropertyRecord.cs
- InArgumentConverter.cs
- ApplicationFileParser.cs
- SamlDelegatingWriter.cs
- FixedHyperLink.cs
- ToolStripKeyboardHandlingService.cs
- RelOps.cs
- BitSet.cs
- ClientConfigPaths.cs
- UpDownEvent.cs
- GeneralTransform2DTo3DTo2D.cs
- ErrorItem.cs
- oledbmetadatacollectionnames.cs
- ListBindingConverter.cs
- Int32.cs
- basevalidator.cs
- BindingExpressionUncommonField.cs
- DeobfuscatingStream.cs
- FixedDocumentPaginator.cs
- OciHandle.cs
- StringInfo.cs
- GetPageCompletedEventArgs.cs
- PenThreadWorker.cs
- ComEventsInfo.cs
- Operator.cs
- SqlXmlStorage.cs
- Msec.cs
- FormDesigner.cs
- LinqDataSourceHelper.cs
- IntranetCredentialPolicy.cs
- EditorZoneDesigner.cs
- FormatPage.cs
- SortFieldComparer.cs
- XPathNodeIterator.cs
- DrawItemEvent.cs
- ForeignKeyConstraint.cs
- ExclusiveHandleList.cs
- TargetException.cs
- SiteMapSection.cs
- QilTargetType.cs
- SqlTriggerAttribute.cs
- BitmapEffect.cs
- VariableAction.cs
- ControlIdConverter.cs
- MessagePropertyFilter.cs
- SqlUnionizer.cs
- WrappedIUnknown.cs
- SqlRecordBuffer.cs
- GridProviderWrapper.cs
- Boolean.cs
- SecurityTokenProvider.cs
- ObjectViewFactory.cs
- BindableTemplateBuilder.cs
- MetadataSerializer.cs
- UpdateCommand.cs
- ErrorBehavior.cs
- BrowserCapabilitiesCompiler.cs
- QueueProcessor.cs
- AdPostCacheSubstitution.cs
- SettingsAttributes.cs
- DispatcherExceptionEventArgs.cs
- IListConverters.cs
- SelectionEditor.cs