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
- PropertyToken.cs
- WebColorConverter.cs
- AuthenticationService.cs
- Certificate.cs
- ClockController.cs
- Content.cs
- TextEffect.cs
- ClientRequest.cs
- ImageProxy.cs
- DbConnectionPoolGroupProviderInfo.cs
- CalloutQueueItem.cs
- InputMethod.cs
- ToolStripSeparatorRenderEventArgs.cs
- DbConnectionStringCommon.cs
- DataPagerFieldCommandEventArgs.cs
- GeneralTransform3DGroup.cs
- TextTreeTextBlock.cs
- ConfigurationProviderException.cs
- CorrelationManager.cs
- SharedPersonalizationStateInfo.cs
- DataPointer.cs
- DirectoryObjectSecurity.cs
- TimeManager.cs
- GraphicsContainer.cs
- PermissionSetEnumerator.cs
- SqlCacheDependencyDatabase.cs
- EntitySqlException.cs
- FontSourceCollection.cs
- DecimalAnimation.cs
- ResourceAssociationTypeEnd.cs
- KeySplineConverter.cs
- ListBase.cs
- DecoratedNameAttribute.cs
- CheckoutException.cs
- GenericParameterDataContract.cs
- XmlElementAttributes.cs
- HttpResponseBase.cs
- ResourcesGenerator.cs
- basecomparevalidator.cs
- Italic.cs
- sqlnorm.cs
- DataGridViewElement.cs
- DataTableClearEvent.cs
- SQlBooleanStorage.cs
- GenericRootAutomationPeer.cs
- FtpRequestCacheValidator.cs
- mactripleDES.cs
- CompiledXpathExpr.cs
- GenericEnumConverter.cs
- MasterPageBuildProvider.cs
- CqlWriter.cs
- ResXResourceReader.cs
- Compiler.cs
- DropShadowEffect.cs
- Lease.cs
- Parallel.cs
- FontCacheUtil.cs
- XmlAttributeProperties.cs
- UpdateRecord.cs
- SpecularMaterial.cs
- RadioButtonPopupAdapter.cs
- MgmtConfigurationRecord.cs
- HtmlInputText.cs
- Rules.cs
- XmlQualifiedName.cs
- EmptyEnumerator.cs
- BaseTemplatedMobileComponentEditor.cs
- httpapplicationstate.cs
- PointLightBase.cs
- Int16.cs
- XmlNode.cs
- XmlWhitespace.cs
- DataRow.cs
- DataServiceStreamResponse.cs
- AdornerPresentationContext.cs
- SafeNativeMethods.cs
- XslCompiledTransform.cs
- EventDescriptor.cs
- DataGridViewElement.cs
- PropertySourceInfo.cs
- TypeLoadException.cs
- StringOutput.cs
- BaseDataBoundControl.cs
- CustomAttribute.cs
- HttpHandlerActionCollection.cs
- ValidationHelpers.cs
- XPathBinder.cs
- SmiEventSink.cs
- HighlightVisual.cs
- PageHandlerFactory.cs
- COM2TypeInfoProcessor.cs
- ToolStripControlHost.cs
- TextAdaptor.cs
- MouseCaptureWithinProperty.cs
- FileClassifier.cs
- UnmanagedMemoryStream.cs
- QilTypeChecker.cs
- MessageBuffer.cs
- UnsafeNativeMethods.cs
- TreeBuilderXamlTranslator.cs