Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / Xml / System / Xml / Serialization / IndentedWriter.cs / 1 / IndentedWriter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Serialization { using System.IO; ////// /// This class will write to a stream and manage indentation. /// internal class IndentedWriter { TextWriter writer; bool needIndent; int indentLevel; bool compact; internal IndentedWriter(TextWriter writer, bool compact) { this.writer = writer; this.compact = compact; } internal int Indent { get { return indentLevel; } set { indentLevel = value; } } internal void Write(string s) { if (needIndent) WriteIndent(); writer.Write(s); } internal void Write(char c) { if (needIndent) WriteIndent(); writer.Write(c); } internal void WriteLine(string s) { if (needIndent) WriteIndent(); writer.WriteLine(s); needIndent = true; } internal void WriteLine() { writer.WriteLine(); needIndent = true; } internal void WriteIndent() { needIndent = false; if (!compact) { for (int i = 0; i < indentLevel; i++) { writer.Write(" "); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QuaternionRotation3D.cs
- CompleteWizardStep.cs
- datacache.cs
- UriExt.cs
- BaseCollection.cs
- EntityViewGenerator.cs
- TriggerActionCollection.cs
- PackagingUtilities.cs
- WmlLabelAdapter.cs
- EntityTypeBase.cs
- XmlStringTable.cs
- PropertyTabAttribute.cs
- ExclusiveHandleList.cs
- GridItem.cs
- ImageMap.cs
- CapabilitiesUse.cs
- TextElementAutomationPeer.cs
- shaperfactoryquerycacheentry.cs
- XamlGridLengthSerializer.cs
- TagMapInfo.cs
- WindowsBrush.cs
- PenLineJoinValidation.cs
- TextTreeRootNode.cs
- DeclarativeCatalogPart.cs
- sqlstateclientmanager.cs
- DeobfuscatingStream.cs
- ConfigurationSectionCollection.cs
- Scene3D.cs
- ReceiveCompletedEventArgs.cs
- ConfigXmlDocument.cs
- CodeTypeMemberCollection.cs
- CodeObjectCreateExpression.cs
- ActivityPreviewDesigner.cs
- IdentityReference.cs
- GridViewSortEventArgs.cs
- ColumnHeader.cs
- TraceUtility.cs
- Completion.cs
- DynamicMethod.cs
- WebPartEditorCancelVerb.cs
- PropertyIdentifier.cs
- CodeFieldReferenceExpression.cs
- OLEDB_Enum.cs
- TableParagraph.cs
- UpdatePanelTrigger.cs
- CallbackValidatorAttribute.cs
- ValidationError.cs
- XmlSchemas.cs
- AbandonedMutexException.cs
- WebPartUserCapability.cs
- WmfPlaceableFileHeader.cs
- TimeSpan.cs
- XPathAncestorQuery.cs
- EntityDataSourceValidationException.cs
- MethodInfo.cs
- WebPartZoneBase.cs
- Underline.cs
- FileDialogPermission.cs
- DefaultHttpHandler.cs
- XmlSerializerNamespaces.cs
- PartialTrustVisibleAssemblyCollection.cs
- XmlSerializerImportOptions.cs
- sqlpipe.cs
- KeyGestureConverter.cs
- IsolatedStorageFileStream.cs
- AtomServiceDocumentSerializer.cs
- ParallelTimeline.cs
- SystemIcmpV6Statistics.cs
- CharEntityEncoderFallback.cs
- DuplexSecurityProtocolFactory.cs
- IPAddressCollection.cs
- DataGridItem.cs
- HttpCookie.cs
- SqlUtil.cs
- DesignerCategoryAttribute.cs
- AttributeData.cs
- HttpApplication.cs
- NameObjectCollectionBase.cs
- KeyInfo.cs
- METAHEADER.cs
- DefaultShape.cs
- TableDetailsRow.cs
- InteropEnvironment.cs
- Avt.cs
- BaseCollection.cs
- TTSVoice.cs
- XslException.cs
- SqlCachedBuffer.cs
- ParserStack.cs
- InputMethodStateTypeInfo.cs
- DispatcherEventArgs.cs
- SQLGuid.cs
- XNameConverter.cs
- RefType.cs
- ConnectionOrientedTransportManager.cs
- AutomationAttributeInfo.cs
- SystemWebCachingSectionGroup.cs
- DataFieldEditor.cs
- XmlILModule.cs
- SAPIEngineTypes.cs