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
- TimeZone.cs
- panel.cs
- XmlNamespaceManager.cs
- ObfuscateAssemblyAttribute.cs
- VariableAction.cs
- CodeStatementCollection.cs
- CreateUserWizardStep.cs
- HierarchicalDataBoundControl.cs
- RawTextInputReport.cs
- SQLUtility.cs
- TimeoutConverter.cs
- LongPath.cs
- PartitionResolver.cs
- ParsedAttributeCollection.cs
- ColorContextHelper.cs
- DateTimeFormatInfo.cs
- LocalFileSettingsProvider.cs
- Nodes.cs
- NullableLongSumAggregationOperator.cs
- latinshape.cs
- KeyedPriorityQueue.cs
- BitmapPalette.cs
- SecurityAlgorithmSuite.cs
- TextElement.cs
- HostProtectionPermission.cs
- DataBindingCollectionConverter.cs
- NTAccount.cs
- Expr.cs
- EventLogTraceListener.cs
- WrappedOptions.cs
- BaseInfoTable.cs
- NoResizeHandleGlyph.cs
- SoapSchemaMember.cs
- PhysicalFontFamily.cs
- FixedDSBuilder.cs
- DrawingContext.cs
- MenuCommands.cs
- FirstMatchCodeGroup.cs
- BitStack.cs
- WebSysDefaultValueAttribute.cs
- WebBrowser.cs
- FormatVersion.cs
- SapiRecognizer.cs
- HelpInfo.cs
- XmlNamespaceDeclarationsAttribute.cs
- COSERVERINFO.cs
- IsolatedStorageFile.cs
- FilterException.cs
- FontDriver.cs
- ConfigurationSectionGroup.cs
- XmlSerializationReader.cs
- HttpConfigurationSystem.cs
- HttpResponseHeader.cs
- OdbcConnectionPoolProviderInfo.cs
- ISCIIEncoding.cs
- ReadOnlyDictionary.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- AxParameterData.cs
- InsufficientMemoryException.cs
- MaskInputRejectedEventArgs.cs
- ComplexType.cs
- EventLog.cs
- PenContext.cs
- basecomparevalidator.cs
- DataKeyArray.cs
- BoolExpression.cs
- DataGridHeaderBorder.cs
- Int64.cs
- RegexStringValidator.cs
- CodeCompileUnit.cs
- TreeNodeStyle.cs
- MultiplexingFormatMapping.cs
- WebFormsRootDesigner.cs
- MemberExpressionHelper.cs
- RawStylusActions.cs
- TraceSwitch.cs
- XmlCharCheckingReader.cs
- ButtonRenderer.cs
- ImageButton.cs
- OutOfMemoryException.cs
- SafeSecurityHandles.cs
- HandlerBase.cs
- SiteMapPath.cs
- OneWayChannelListener.cs
- EditorResources.cs
- IdentifierCreationService.cs
- SQLInt32.cs
- IntAverageAggregationOperator.cs
- ResourceManagerWrapper.cs
- ArrangedElementCollection.cs
- BinHexDecoder.cs
- ProfileGroupSettings.cs
- TextEditor.cs
- OracleConnectionFactory.cs
- FontInfo.cs
- linebase.cs
- StateItem.cs
- VirtualizedItemProviderWrapper.cs
- XmlNodeReader.cs
- XsdDuration.cs