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
- TypeDelegator.cs
- FtpCachePolicyElement.cs
- XPathExpr.cs
- Model3DGroup.cs
- RijndaelManaged.cs
- HashMembershipCondition.cs
- _SSPISessionCache.cs
- mactripleDES.cs
- StartUpEventArgs.cs
- ConfigXmlText.cs
- ReadOnlyHierarchicalDataSourceView.cs
- AsymmetricKeyExchangeFormatter.cs
- StaticSiteMapProvider.cs
- BitmapDecoder.cs
- WasAdminWrapper.cs
- AssemblyEvidenceFactory.cs
- LoadRetryConstantStrategy.cs
- LoginUtil.cs
- ShaderEffect.cs
- MethodCallTranslator.cs
- GPRECT.cs
- PersonalizationStateInfoCollection.cs
- DataRelation.cs
- Point4DValueSerializer.cs
- WindowsIdentity.cs
- CellParagraph.cs
- ToggleProviderWrapper.cs
- ImageIndexEditor.cs
- DataGridViewCellLinkedList.cs
- FontStyle.cs
- GraphicsContext.cs
- ProfileBuildProvider.cs
- CompositeFontParser.cs
- XmlSchemaImporter.cs
- SignatureSummaryDialog.cs
- DesignerDataRelationship.cs
- LiteralControl.cs
- FileUpload.cs
- SafeFileMapViewHandle.cs
- RuntimeConfig.cs
- StringArrayConverter.cs
- __FastResourceComparer.cs
- WebPartCancelEventArgs.cs
- HeaderPanel.cs
- DbParameterHelper.cs
- ValueType.cs
- DetailsViewUpdatedEventArgs.cs
- ScriptModule.cs
- ZipIOLocalFileDataDescriptor.cs
- CachedFontFamily.cs
- CircleHotSpot.cs
- XmlNamespaceManager.cs
- CommonBehaviorsSection.cs
- WebPartExportVerb.cs
- BinaryUtilClasses.cs
- DataBoundControlDesigner.cs
- PeerContact.cs
- GeometryCombineModeValidation.cs
- HebrewNumber.cs
- MethodImplAttribute.cs
- GridPattern.cs
- FrameworkElementAutomationPeer.cs
- TextElementEnumerator.cs
- BindingManagerDataErrorEventArgs.cs
- FileDialogPermission.cs
- ReadOnlyCollectionBase.cs
- LogReservationCollection.cs
- Constraint.cs
- WebHostScriptMappingsInstallComponent.cs
- CodeSnippetTypeMember.cs
- KeyMatchBuilder.cs
- ServiceDesigner.xaml.cs
- RequestCacheEntry.cs
- XmlDomTextWriter.cs
- IdentityReference.cs
- ConfigXmlAttribute.cs
- SimpleBitVector32.cs
- MonitorWrapper.cs
- ArrayItemReference.cs
- SerialPinChanges.cs
- XmlTypeAttribute.cs
- RegistrationServices.cs
- SqlProcedureAttribute.cs
- InputElement.cs
- NativeMethods.cs
- X509Chain.cs
- HandlerBase.cs
- CodeFieldReferenceExpression.cs
- IPPacketInformation.cs
- EntryWrittenEventArgs.cs
- ReverseQueryOperator.cs
- FixedDocumentSequencePaginator.cs
- ContextProperty.cs
- EntityDataSourceDesigner.cs
- BitmapCodecInfo.cs
- PreservationFileWriter.cs
- DocumentApplication.cs
- XD.cs
- XmlSchemaSubstitutionGroup.cs
- Command.cs