Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Xml / System / Xml / Dom / XmlComment.cs / 1 / XmlComment.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
namespace System.Xml {
using System.Xml.XPath;
using System.Diagnostics;
// Represents the content of an XML comment.
public class XmlComment: XmlCharacterData {
protected internal XmlComment( string comment, XmlDocument doc ): base( comment, doc ) {
}
// Gets the name of the node.
public override String Name {
get { return OwnerDocument.strCommentName;}
}
// Gets the name of the current node without the namespace prefix.
public override String LocalName {
get { return OwnerDocument.strCommentName;}
}
// Gets the type of the current node.
public override XmlNodeType NodeType {
get { return XmlNodeType.Comment;}
}
// Creates a duplicate of this node.
public override XmlNode CloneNode(bool deep) {
Debug.Assert( OwnerDocument != null );
return OwnerDocument.CreateComment( Data );
}
// Saves the node to the specified XmlWriter.
public override void WriteTo(XmlWriter w) {
w.WriteComment( Data );
}
// Saves all the children of the node to the specified XmlWriter.
public override void WriteContentTo(XmlWriter w) {
// Intentionally do nothing
}
internal override XPathNodeType XPNodeType { get { return XPathNodeType.Comment; } }
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
namespace System.Xml {
using System.Xml.XPath;
using System.Diagnostics;
// Represents the content of an XML comment.
public class XmlComment: XmlCharacterData {
protected internal XmlComment( string comment, XmlDocument doc ): base( comment, doc ) {
}
// Gets the name of the node.
public override String Name {
get { return OwnerDocument.strCommentName;}
}
// Gets the name of the current node without the namespace prefix.
public override String LocalName {
get { return OwnerDocument.strCommentName;}
}
// Gets the type of the current node.
public override XmlNodeType NodeType {
get { return XmlNodeType.Comment;}
}
// Creates a duplicate of this node.
public override XmlNode CloneNode(bool deep) {
Debug.Assert( OwnerDocument != null );
return OwnerDocument.CreateComment( Data );
}
// Saves the node to the specified XmlWriter.
public override void WriteTo(XmlWriter w) {
w.WriteComment( Data );
}
// Saves all the children of the node to the specified XmlWriter.
public override void WriteContentTo(XmlWriter w) {
// Intentionally do nothing
}
internal override XPathNodeType XPNodeType { get { return XPathNodeType.Comment; } }
}
}
// 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
- TemplateParser.cs
- GraphicsPath.cs
- ClientTargetCollection.cs
- DataList.cs
- XPathAncestorIterator.cs
- RegexMatch.cs
- LongTypeConverter.cs
- Rotation3D.cs
- CodeBinaryOperatorExpression.cs
- SystemResourceHost.cs
- TransformGroup.cs
- DispatchChannelSink.cs
- VisualProxy.cs
- InstanceData.cs
- ImageCodecInfoPrivate.cs
- PathSegmentCollection.cs
- DodSequenceMerge.cs
- ErrorFormatterPage.cs
- FlatButtonAppearance.cs
- DiscoveryServerProtocol.cs
- SoapMessage.cs
- DictionaryEntry.cs
- ActivityContext.cs
- WebPartsPersonalizationAuthorization.cs
- SystemWebExtensionsSectionGroup.cs
- IdentityHolder.cs
- NodeCounter.cs
- BlurEffect.cs
- Tile.cs
- UpdateEventArgs.cs
- MutexSecurity.cs
- RawMouseInputReport.cs
- SystemIPInterfaceStatistics.cs
- ToolStripDropDownItemDesigner.cs
- WeakReferenceEnumerator.cs
- UnknownBitmapEncoder.cs
- SafeFindHandle.cs
- WebControlsSection.cs
- Rectangle.cs
- FormClosedEvent.cs
- TickBar.cs
- SimpleTextLine.cs
- SecurityContext.cs
- SchemaInfo.cs
- XPathNodeIterator.cs
- TemplatePagerField.cs
- RNGCryptoServiceProvider.cs
- _NetRes.cs
- XmlWriterDelegator.cs
- DefaultTraceListener.cs
- _ContextAwareResult.cs
- ColorTransform.cs
- BaseCAMarshaler.cs
- MemoryFailPoint.cs
- DataError.cs
- BinaryWriter.cs
- Italic.cs
- VerticalAlignConverter.cs
- MsmqInputSessionChannelListener.cs
- Win32PrintDialog.cs
- TagPrefixCollection.cs
- SoapSchemaExporter.cs
- HttpAsyncResult.cs
- PrinterSettings.cs
- SslStream.cs
- AttributedMetaModel.cs
- LabelLiteral.cs
- IsolatedStorageFile.cs
- Comparer.cs
- SecurityTokenSerializer.cs
- ViewValidator.cs
- BaseValidatorDesigner.cs
- NotifyIcon.cs
- ArrangedElement.cs
- NullRuntimeConfig.cs
- RevocationPoint.cs
- HighlightComponent.cs
- InputMethodStateChangeEventArgs.cs
- HttpProtocolImporter.cs
- RoleManagerModule.cs
- TextChangedEventArgs.cs
- HashHelper.cs
- SimpleMailWebEventProvider.cs
- __Error.cs
- Point4DValueSerializer.cs
- DefaultValueTypeConverter.cs
- GridSplitter.cs
- WorkBatch.cs
- SafeThemeHandle.cs
- DataGridViewCellCancelEventArgs.cs
- ApplicationBuildProvider.cs
- DataGridViewTextBoxCell.cs
- HScrollProperties.cs
- Transaction.cs
- Int16Animation.cs
- BaseTemplateParser.cs
- BindingCompleteEventArgs.cs
- XmlDataSourceView.cs
- HostProtectionException.cs
- TemplateNameScope.cs