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
- Compiler.cs
- EndpointInstanceProvider.cs
- ImmutablePropertyDescriptorGridEntry.cs
- ContravarianceAdapter.cs
- RegexMatch.cs
- DesignerSerializerAttribute.cs
- SqlExpressionNullability.cs
- TCPClient.cs
- HttpPostedFileBase.cs
- FileVersionInfo.cs
- PropertyGridView.cs
- LogManagementAsyncResult.cs
- Mapping.cs
- StrongNameIdentityPermission.cs
- MarginsConverter.cs
- InternalControlCollection.cs
- DetailsViewInsertedEventArgs.cs
- SqlVersion.cs
- XmlSchemaAnyAttribute.cs
- QueryStringParameter.cs
- BreakRecordTable.cs
- GenericTextProperties.cs
- SafeWaitHandle.cs
- MessageEncoderFactory.cs
- TreeNodeStyle.cs
- DBNull.cs
- StreamWriter.cs
- ResourcesGenerator.cs
- MimeWriter.cs
- KeyNameIdentifierClause.cs
- Sequence.cs
- TypeConverterAttribute.cs
- LineGeometry.cs
- VisualStyleRenderer.cs
- ACL.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- Properties.cs
- OdbcDataAdapter.cs
- StdValidatorsAndConverters.cs
- ZipIOBlockManager.cs
- DataRowExtensions.cs
- ViewEvent.cs
- UIntPtr.cs
- XmlNavigatorFilter.cs
- mda.cs
- InstanceHandleConflictException.cs
- SiteMapDataSourceView.cs
- TransformationRules.cs
- ObjectDataSourceFilteringEventArgs.cs
- SimpleTypeResolver.cs
- DebugController.cs
- OutputCacheSettings.cs
- LinkClickEvent.cs
- OracleSqlParser.cs
- HitTestWithGeometryDrawingContextWalker.cs
- PageThemeCodeDomTreeGenerator.cs
- WebPartDisplayModeEventArgs.cs
- _SafeNetHandles.cs
- SpeechAudioFormatInfo.cs
- RoutingTable.cs
- ListViewDataItem.cs
- PropertySegmentSerializationProvider.cs
- Label.cs
- SoapExtensionTypeElement.cs
- ExtensionFile.cs
- MultiAsyncResult.cs
- SqlServices.cs
- TimelineGroup.cs
- GeometryModel3D.cs
- SqlBulkCopyColumnMappingCollection.cs
- DocumentCollection.cs
- MetaType.cs
- HttpVersion.cs
- DispatcherObject.cs
- Permission.cs
- DateTimeConverter.cs
- ListDictionary.cs
- ImageAttributes.cs
- QueryExtender.cs
- RbTree.cs
- COAUTHIDENTITY.cs
- CqlLexerHelpers.cs
- BindingsCollection.cs
- PropertyEmitterBase.cs
- GridViewCancelEditEventArgs.cs
- Stream.cs
- XamlSerializerUtil.cs
- XmlnsDefinitionAttribute.cs
- SerializationSectionGroup.cs
- HwndAppCommandInputProvider.cs
- XmlValidatingReaderImpl.cs
- PriorityQueue.cs
- TypedColumnHandler.cs
- NameNode.cs
- StateWorkerRequest.cs
- CriticalExceptions.cs
- MergePropertyDescriptor.cs
- RectangleConverter.cs
- AgileSafeNativeMemoryHandle.cs
- DbProviderFactory.cs