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
- SpAudioStreamWrapper.cs
- x509store.cs
- baseaxisquery.cs
- TimeStampChecker.cs
- XamlHostingSection.cs
- ScaleTransform.cs
- Decorator.cs
- SafeProcessHandle.cs
- PageContent.cs
- ExtensionWindowHeader.cs
- RenderDataDrawingContext.cs
- CustomErrorCollection.cs
- VisualBasic.cs
- ObjectParameterCollection.cs
- HttpChannelBindingToken.cs
- AppModelKnownContentFactory.cs
- ServiceAuthorizationManager.cs
- GridView.cs
- FixedSchema.cs
- DocumentCollection.cs
- MailFileEditor.cs
- PropertyDescriptorGridEntry.cs
- WebPartDeleteVerb.cs
- ExpressionBinding.cs
- backend.cs
- PropertyKey.cs
- ServiceObjectContainer.cs
- HostnameComparisonMode.cs
- BulletChrome.cs
- HelloOperationAsyncResult.cs
- DataControlPagerLinkButton.cs
- WebSysDefaultValueAttribute.cs
- NamespaceEmitter.cs
- WebPartZone.cs
- EventHandlerList.cs
- BinaryMessageFormatter.cs
- GridViewCellAutomationPeer.cs
- FormsAuthentication.cs
- ContainerVisual.cs
- StateItem.cs
- ExceptionAggregator.cs
- HtmlControl.cs
- TextChangedEventArgs.cs
- SelectionPattern.cs
- FlowDocumentPage.cs
- WebHttpSecurityElement.cs
- ProcessingInstructionAction.cs
- StoreItemCollection.cs
- SchemaTableOptionalColumn.cs
- MsmqInputMessagePool.cs
- SectionVisual.cs
- login.cs
- DebugView.cs
- FigureHelper.cs
- XmlDomTextWriter.cs
- Adorner.cs
- TransformerConfigurationWizardBase.cs
- TreeNode.cs
- Root.cs
- WebServiceClientProxyGenerator.cs
- PageTheme.cs
- ReflectionHelper.cs
- EmbeddedMailObjectsCollection.cs
- ImageMap.cs
- CustomLineCap.cs
- WebPartZoneDesigner.cs
- MediaScriptCommandRoutedEventArgs.cs
- ReadOnlyDataSourceView.cs
- InvalidEnumArgumentException.cs
- WebCategoryAttribute.cs
- Latin1Encoding.cs
- HtmlPageAdapter.cs
- SmtpReplyReaderFactory.cs
- entitydatasourceentitysetnameconverter.cs
- DesignTimeTemplateParser.cs
- WorkflowNamespace.cs
- MenuItemBinding.cs
- ResourceContainer.cs
- CollectionViewProxy.cs
- SerializerDescriptor.cs
- IconConverter.cs
- FixedSOMTableRow.cs
- TagNameToTypeMapper.cs
- DataGridDetailsPresenterAutomationPeer.cs
- BufferedGenericXmlSecurityToken.cs
- WebPartDescription.cs
- SqlCaseSimplifier.cs
- SelectedDatesCollection.cs
- BrowserCapabilitiesCompiler.cs
- SpanIndex.cs
- FamilyTypeface.cs
- ListenerSingletonConnectionReader.cs
- TypedTableBase.cs
- DataRelation.cs
- BuildProvider.cs
- EntityClassGenerator.cs
- TreeNodeStyleCollection.cs
- Literal.cs
- SplitterEvent.cs
- Bitmap.cs