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
- IIS7UserPrincipal.cs
- ZoneButton.cs
- FieldDescriptor.cs
- RectangleHotSpot.cs
- Debug.cs
- DBCommand.cs
- PerspectiveCamera.cs
- ActivityPropertyReference.cs
- SettingsAttributes.cs
- OdbcConnectionFactory.cs
- ConnectionConsumerAttribute.cs
- EntityDataSourceContainerNameItem.cs
- DataServiceQueryProvider.cs
- DataSvcMapFile.cs
- ChannelCacheDefaults.cs
- StorageInfo.cs
- HttpCookiesSection.cs
- XmlILConstructAnalyzer.cs
- TraceFilter.cs
- PrintPreviewControl.cs
- CultureData.cs
- AutoGeneratedFieldProperties.cs
- Parser.cs
- ValidationHelper.cs
- ExpressionHelper.cs
- XsdCachingReader.cs
- DesignerVerb.cs
- FragmentNavigationEventArgs.cs
- ColumnPropertiesGroup.cs
- WizardPanel.cs
- DbConnectionInternal.cs
- ProvideValueServiceProvider.cs
- TextBox.cs
- TimeSpanHelper.cs
- Int16.cs
- MissingManifestResourceException.cs
- HtmlWindow.cs
- BinaryWriter.cs
- LinkedResource.cs
- PersistChildrenAttribute.cs
- wgx_sdk_version.cs
- GridViewRow.cs
- XomlCompilerParameters.cs
- EqualityComparer.cs
- RawMouseInputReport.cs
- DataServiceQueryOfT.cs
- MessageSmuggler.cs
- DeploymentExceptionMapper.cs
- CompilerParameters.cs
- DnsCache.cs
- ValidatorUtils.cs
- UrlPath.cs
- WmlControlAdapter.cs
- TypeDescriptionProviderAttribute.cs
- SqlConnectionStringBuilder.cs
- TemplateControlBuildProvider.cs
- ExpressionConverter.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- SafeIUnknown.cs
- CodeConstructor.cs
- RuntimeConfigLKG.cs
- Wildcard.cs
- control.ime.cs
- ReceiveContextCollection.cs
- loginstatus.cs
- EventWaitHandle.cs
- PageThemeCodeDomTreeGenerator.cs
- QilParameter.cs
- SQLDecimalStorage.cs
- XmlNodeComparer.cs
- DebugHandleTracker.cs
- _ChunkParse.cs
- FaultException.cs
- BasicExpandProvider.cs
- RichTextBoxAutomationPeer.cs
- BinaryCommonClasses.cs
- XmlDesignerDataSourceView.cs
- StopStoryboard.cs
- WebAdminConfigurationHelper.cs
- TraceListener.cs
- CodeStatementCollection.cs
- TextEmbeddedObject.cs
- HtmlToClrEventProxy.cs
- Int32AnimationUsingKeyFrames.cs
- SymLanguageType.cs
- securestring.cs
- DotExpr.cs
- SQLGuid.cs
- Single.cs
- TagElement.cs
- CallbackValidator.cs
- ImageCollectionCodeDomSerializer.cs
- ElapsedEventArgs.cs
- TextModifierScope.cs
- WebEventCodes.cs
- XMLSchema.cs
- CompositeKey.cs
- Int32.cs
- LayoutDump.cs
- SqlReorderer.cs