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
- DATA_BLOB.cs
- SiteMapHierarchicalDataSourceView.cs
- AlternateView.cs
- TextureBrush.cs
- ClientBuildManager.cs
- WebBrowserHelper.cs
- GreenMethods.cs
- DataTransferEventArgs.cs
- ElementInit.cs
- Pointer.cs
- SocketPermission.cs
- PathTooLongException.cs
- WmfPlaceableFileHeader.cs
- ReferenceService.cs
- CurrencyManager.cs
- SynchronizedReadOnlyCollection.cs
- WebServiceReceive.cs
- HttpGetProtocolImporter.cs
- ColorAnimation.cs
- MonitoringDescriptionAttribute.cs
- CodeArrayIndexerExpression.cs
- WebRequestModulesSection.cs
- TagNameToTypeMapper.cs
- FormsAuthenticationEventArgs.cs
- CLSCompliantAttribute.cs
- DataGridViewImageCell.cs
- SubMenuStyleCollection.cs
- EmptyEnumerator.cs
- WindowsGrip.cs
- Profiler.cs
- ResizeGrip.cs
- ContainerTracking.cs
- SelectionUIHandler.cs
- MenuStrip.cs
- TraceUtils.cs
- _SslState.cs
- EntitySqlQueryCacheKey.cs
- SynchronizationContext.cs
- SslSecurityTokenParameters.cs
- ipaddressinformationcollection.cs
- InputProcessorProfiles.cs
- KeyboardDevice.cs
- BufferModesCollection.cs
- CellParaClient.cs
- MultiBinding.cs
- sqlnorm.cs
- UITypeEditor.cs
- NamespaceCollection.cs
- AsynchronousChannelMergeEnumerator.cs
- MobilePage.cs
- TextElement.cs
- UnaryNode.cs
- WebPartTransformer.cs
- returneventsaver.cs
- FastEncoder.cs
- OutOfProcStateClientManager.cs
- DynamicObject.cs
- DataPagerCommandEventArgs.cs
- DependencyProperty.cs
- SerialErrors.cs
- SizeIndependentAnimationStorage.cs
- ConfigurationValues.cs
- IMembershipProvider.cs
- ExecutionEngineException.cs
- DataBindingHandlerAttribute.cs
- lengthconverter.cs
- DataRecordInternal.cs
- NumericUpDownAccelerationCollection.cs
- MultipartIdentifier.cs
- ActivityCompletionCallbackWrapper.cs
- LoadedOrUnloadedOperation.cs
- DataServiceHostFactory.cs
- SQLByte.cs
- MemberAccessException.cs
- UnauthorizedAccessException.cs
- WebPartZoneDesigner.cs
- WizardPanel.cs
- EventLogRecord.cs
- IntellisenseTextBox.cs
- CookieHandler.cs
- GeneralTransform2DTo3D.cs
- sitestring.cs
- DelegateTypeInfo.cs
- CryptoConfig.cs
- _ChunkParse.cs
- LongMinMaxAggregationOperator.cs
- AnnotationAdorner.cs
- QueryExpr.cs
- CodeTypeMemberCollection.cs
- PersonalizationProvider.cs
- QueryAsyncResult.cs
- Rect3D.cs
- TraceRecords.cs
- ToolBarButtonClickEvent.cs
- FixedSOMTableRow.cs
- ImageCodecInfo.cs
- GeometryModel3D.cs
- _ConnectionGroup.cs
- EditorOptionAttribute.cs
- ServerValidateEventArgs.cs