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
- UriTemplate.cs
- SessionEndingEventArgs.cs
- StateWorkerRequest.cs
- BaseProcessor.cs
- MetadataItemEmitter.cs
- DataGridViewRowPrePaintEventArgs.cs
- Subset.cs
- ColorConvertedBitmap.cs
- ISSmlParser.cs
- Collection.cs
- SafeHandle.cs
- PrintController.cs
- NameValueSectionHandler.cs
- XmlTextReader.cs
- SafeBitVector32.cs
- indexingfiltermarshaler.cs
- ListControlDataBindingHandler.cs
- QuadraticBezierSegment.cs
- Scene3D.cs
- AppliedDeviceFiltersDialog.cs
- SafeNativeMethods.cs
- StaticTextPointer.cs
- SpotLight.cs
- GiveFeedbackEventArgs.cs
- ApplicationId.cs
- ListBindingHelper.cs
- ITextView.cs
- LightweightCodeGenerator.cs
- WebPartCloseVerb.cs
- HierarchicalDataBoundControl.cs
- ItemsPresenter.cs
- TextEditorParagraphs.cs
- TextDocumentView.cs
- ClientRuntimeConfig.cs
- BasicDesignerLoader.cs
- DefaultMergeHelper.cs
- ArgumentException.cs
- SequentialWorkflowHeaderFooter.cs
- ProviderSettingsCollection.cs
- ComboBox.cs
- WpfSharedBamlSchemaContext.cs
- InstanceDescriptor.cs
- TreeNodeBindingCollection.cs
- GroupItemAutomationPeer.cs
- SolidBrush.cs
- ValidateNames.cs
- MemoryFailPoint.cs
- TextPattern.cs
- FunctionDetailsReader.cs
- DataKeyCollection.cs
- PartialCachingAttribute.cs
- DomainUpDown.cs
- _HelperAsyncResults.cs
- DeploymentSectionCache.cs
- FullTextState.cs
- BuildProviderAppliesToAttribute.cs
- FormatConvertedBitmap.cs
- WebConfigurationManager.cs
- OletxEnlistment.cs
- ToolStripTextBox.cs
- ObsoleteAttribute.cs
- WebPartRestoreVerb.cs
- HotSpot.cs
- FtpRequestCacheValidator.cs
- TogglePatternIdentifiers.cs
- ReachDocumentPageSerializerAsync.cs
- OleDbSchemaGuid.cs
- RequestContext.cs
- MsmqIntegrationChannelListener.cs
- FixedSOMFixedBlock.cs
- IsolationInterop.cs
- FrameworkElementFactoryMarkupObject.cs
- RepeatEnumerable.cs
- SpotLight.cs
- XmlSchemaImport.cs
- PropertyGeneratedEventArgs.cs
- XPathDocumentIterator.cs
- EventLogPermissionAttribute.cs
- DateTimeConverter2.cs
- CounterSet.cs
- ProfileManager.cs
- HtmlTableRow.cs
- Splitter.cs
- VirtualPathProvider.cs
- WindowsComboBox.cs
- RedirectionProxy.cs
- CodeSnippetExpression.cs
- LogArchiveSnapshot.cs
- AssemblyCache.cs
- DbConnectionPoolGroupProviderInfo.cs
- MatrixIndependentAnimationStorage.cs
- XsltSettings.cs
- filewebrequest.cs
- XmlSerializerSection.cs
- Mutex.cs
- CqlLexerHelpers.cs
- RemotingSurrogateSelector.cs
- NullableIntMinMaxAggregationOperator.cs
- TogglePatternIdentifiers.cs
- ConfigXmlReader.cs