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
- Mutex.cs
- AtomContentProperty.cs
- CompiledQuery.cs
- GeometryGroup.cs
- IsolationInterop.cs
- _AuthenticationState.cs
- DeferredRunTextReference.cs
- PathSegmentCollection.cs
- ContextProperty.cs
- FontResourceCache.cs
- RegisteredHiddenField.cs
- SrgsItemList.cs
- RegisteredDisposeScript.cs
- CipherData.cs
- DependencyPropertyAttribute.cs
- ServiceDurableInstance.cs
- XmlEventCache.cs
- SqlUtils.cs
- InfoCardSymmetricCrypto.cs
- ErrorWrapper.cs
- SortKey.cs
- PowerStatus.cs
- DrawListViewItemEventArgs.cs
- Int64Animation.cs
- Helper.cs
- DbProviderConfigurationHandler.cs
- IdentityModelStringsVersion1.cs
- HttpApplication.cs
- AttributeCollection.cs
- SpellCheck.cs
- OleDbConnectionInternal.cs
- FileSystemInfo.cs
- TemplateXamlParser.cs
- BlockCollection.cs
- SettingsContext.cs
- CriticalFinalizerObject.cs
- SHA256.cs
- httpapplicationstate.cs
- DataGridViewColumnHeaderCell.cs
- ConcurrentQueue.cs
- DPAPIProtectedConfigurationProvider.cs
- PictureBox.cs
- DynamicMethod.cs
- _ProxyRegBlob.cs
- HyperLinkField.cs
- DbDataAdapter.cs
- SqlInternalConnection.cs
- LabelLiteral.cs
- LinqDataSourceInsertEventArgs.cs
- UIPermission.cs
- Converter.cs
- BinHexEncoder.cs
- __ComObject.cs
- PolicyChain.cs
- ListItemCollection.cs
- ExpressionEvaluator.cs
- TreeNodeConverter.cs
- TextServicesProperty.cs
- DocumentPageTextView.cs
- ValidatedControlConverter.cs
- MaskedTextProvider.cs
- TableColumn.cs
- BufferAllocator.cs
- SignatureToken.cs
- CustomAttributeBuilder.cs
- TextSpan.cs
- BamlRecordHelper.cs
- DateTimeValueSerializerContext.cs
- CodeParameterDeclarationExpressionCollection.cs
- HatchBrush.cs
- AbsoluteQuery.cs
- ResetableIterator.cs
- InputBinder.cs
- SessionStateSection.cs
- ResourcesBuildProvider.cs
- SmiEventSink.cs
- OutputCacheSettings.cs
- ReadWriteSpinLock.cs
- PlainXmlWriter.cs
- Authorization.cs
- GridViewItemAutomationPeer.cs
- UriSectionData.cs
- COM2PropertyBuilderUITypeEditor.cs
- HwndSource.cs
- Pair.cs
- MarkupCompilePass1.cs
- TraceHandler.cs
- BlockCollection.cs
- SupportsEventValidationAttribute.cs
- SequentialOutput.cs
- SqlDataSourceRefreshSchemaForm.cs
- ValidatorCompatibilityHelper.cs
- MetricEntry.cs
- TemplateBindingExpression.cs
- XmlTypeMapping.cs
- UnsafeNativeMethods.cs
- PathNode.cs
- ServiceDescriptions.cs
- StorageFunctionMapping.cs
- ResourceWriter.cs