Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / Dom / XmlDomTextWriter.cs / 1305376 / XmlDomTextWriter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System; using System.IO; using System.Text; using System.Runtime.Versioning; // Represents a writer that will make it possible to work with prefixes even // if the namespace is not specified. // This is not possible with XmlTextWriter. But this class inherits XmlTextWriter. internal class XmlDOMTextWriter : XmlTextWriter { public XmlDOMTextWriter( Stream w, Encoding encoding ) : base( w,encoding ) { } [ResourceConsumption(ResourceScope.Machine)] [ResourceExposure(ResourceScope.Machine)] public XmlDOMTextWriter( String filename, Encoding encoding ) : base( filename,encoding ){ } public XmlDOMTextWriter( TextWriter w ) : base( w ){ } // Overrides the baseclass implementation so that emptystring prefixes do // do not fail if namespace is not specified. public override void WriteStartElement( string prefix, string localName, string ns ){ if( ( ns.Length == 0 ) && ( prefix.Length != 0 ) ) prefix = "" ; base.WriteStartElement( prefix, localName, ns ); } // Overrides the baseclass implementation so that emptystring prefixes do // do not fail if namespace is not specified. public override void WriteStartAttribute( string prefix, string localName, string ns ){ if( ( ns.Length == 0 ) && ( prefix.Length != 0 ) ) prefix = "" ; base.WriteStartAttribute( prefix, localName, ns ); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System; using System.IO; using System.Text; using System.Runtime.Versioning; // Represents a writer that will make it possible to work with prefixes even // if the namespace is not specified. // This is not possible with XmlTextWriter. But this class inherits XmlTextWriter. internal class XmlDOMTextWriter : XmlTextWriter { public XmlDOMTextWriter( Stream w, Encoding encoding ) : base( w,encoding ) { } [ResourceConsumption(ResourceScope.Machine)] [ResourceExposure(ResourceScope.Machine)] public XmlDOMTextWriter( String filename, Encoding encoding ) : base( filename,encoding ){ } public XmlDOMTextWriter( TextWriter w ) : base( w ){ } // Overrides the baseclass implementation so that emptystring prefixes do // do not fail if namespace is not specified. public override void WriteStartElement( string prefix, string localName, string ns ){ if( ( ns.Length == 0 ) && ( prefix.Length != 0 ) ) prefix = "" ; base.WriteStartElement( prefix, localName, ns ); } // Overrides the baseclass implementation so that emptystring prefixes do // do not fail if namespace is not specified. public override void WriteStartAttribute( string prefix, string localName, string ns ){ if( ( ns.Length == 0 ) && ( prefix.Length != 0 ) ) prefix = "" ; base.WriteStartAttribute( prefix, localName, ns ); } } } // 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
- IDictionary.cs
- WebResourceAttribute.cs
- IItemContainerGenerator.cs
- CachingHintValidation.cs
- EncoderFallback.cs
- TextCharacters.cs
- LogExtent.cs
- DesignerVerbToolStripMenuItem.cs
- XmlIgnoreAttribute.cs
- DefaultObjectMappingItemCollection.cs
- LicFileLicenseProvider.cs
- SequentialWorkflowHeaderFooter.cs
- MsmqIntegrationBindingCollectionElement.cs
- _StreamFramer.cs
- TraceEventCache.cs
- ContextProperty.cs
- Brush.cs
- CodeDomLoader.cs
- HtmlMobileTextWriter.cs
- TableItemProviderWrapper.cs
- CheckBoxRenderer.cs
- RelatedEnd.cs
- MetadataWorkspace.cs
- BeginStoryboard.cs
- HeaderCollection.cs
- WindowsSspiNegotiation.cs
- TabletDevice.cs
- TableLayoutPanelCellPosition.cs
- ProjectionNode.cs
- StatusStrip.cs
- BorderGapMaskConverter.cs
- PackagePart.cs
- EntityObject.cs
- DictionarySectionHandler.cs
- GridViewCellAutomationPeer.cs
- SqlDataSource.cs
- CodeDirectionExpression.cs
- SequenceDesignerAccessibleObject.cs
- TextBoxAutomationPeer.cs
- CheckBoxBaseAdapter.cs
- PersonalizationProviderHelper.cs
- Normalization.cs
- HtmlShimManager.cs
- TypeForwardedFromAttribute.cs
- SafeCloseHandleCritical.cs
- SqlAliaser.cs
- GeometryDrawing.cs
- SqlCharStream.cs
- GradientStop.cs
- EncoderBestFitFallback.cs
- XmlNode.cs
- TypeDescriptionProvider.cs
- StrongNameUtility.cs
- LeafCellTreeNode.cs
- DLinqColumnProvider.cs
- DataMemberListEditor.cs
- CompilerParameters.cs
- Lease.cs
- Transform3DCollection.cs
- DeleteHelper.cs
- ComponentResourceManager.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- XmlILAnnotation.cs
- Bits.cs
- ResetableIterator.cs
- DataGridViewComponentPropertyGridSite.cs
- SystemDiagnosticsSection.cs
- RegexInterpreter.cs
- TdsParserSessionPool.cs
- LocalizableAttribute.cs
- CommandEventArgs.cs
- BitmapFrame.cs
- SystemColors.cs
- CodeAccessSecurityEngine.cs
- SchemaElement.cs
- GraphicsPath.cs
- DesignerAttributeInfo.cs
- ObjectStateFormatter.cs
- listitem.cs
- wpf-etw.cs
- PropertyPath.cs
- RadioButton.cs
- CombinedHttpChannel.cs
- InternalConfigRoot.cs
- TreeNodeStyleCollection.cs
- SmiConnection.cs
- HTMLTagNameToTypeMapper.cs
- ComponentChangedEvent.cs
- XmlSerializerNamespaces.cs
- Image.cs
- RewritingPass.cs
- SystemParameters.cs
- base64Transforms.cs
- HtmlInputText.cs
- NetMsmqBindingCollectionElement.cs
- ActivityDesignerHelper.cs
- CodeVariableDeclarationStatement.cs
- TypefaceMap.cs
- DetailsViewRow.cs
- validationstate.cs