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
- _TransmitFileOverlappedAsyncResult.cs
- ExpressionWriter.cs
- StringValueConverter.cs
- HttpRuntime.cs
- OleDbPermission.cs
- TrackingMemoryStream.cs
- Delegate.cs
- Brush.cs
- WeakEventTable.cs
- CardSpaceException.cs
- CssStyleCollection.cs
- ReflectTypeDescriptionProvider.cs
- ToolboxItemLoader.cs
- COM2Properties.cs
- Span.cs
- XPathNodeHelper.cs
- HtmlShim.cs
- MetadataUtil.cs
- DecoderNLS.cs
- control.ime.cs
- FloaterParaClient.cs
- SqlTransaction.cs
- Types.cs
- Speller.cs
- AsymmetricKeyExchangeDeformatter.cs
- Vector3DKeyFrameCollection.cs
- ReadOnlyObservableCollection.cs
- Rectangle.cs
- Empty.cs
- ModuleConfigurationInfo.cs
- HttpClientCertificate.cs
- QilGeneratorEnv.cs
- ComponentCollection.cs
- ListViewDeletedEventArgs.cs
- XmlSignatureManifest.cs
- CreateBookmarkScope.cs
- ToolStripContainerActionList.cs
- TargetException.cs
- RawStylusSystemGestureInputReport.cs
- LocalizedNameDescriptionPair.cs
- TextEditorMouse.cs
- TextComposition.cs
- BamlRecordHelper.cs
- oledbconnectionstring.cs
- BitmapEffectInput.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- SapiRecognizer.cs
- ClassDataContract.cs
- Rect3DValueSerializer.cs
- FixedTextContainer.cs
- Opcode.cs
- HtmlInputPassword.cs
- SiteMapHierarchicalDataSourceView.cs
- SessionEndingCancelEventArgs.cs
- Point3DConverter.cs
- ViewKeyConstraint.cs
- OdbcEnvironmentHandle.cs
- MethodExpr.cs
- Color.cs
- IList.cs
- __Filters.cs
- ListItem.cs
- SpellerStatusTable.cs
- ContainerCodeDomSerializer.cs
- Oid.cs
- XmlSchemas.cs
- Grid.cs
- DataBindingExpressionBuilder.cs
- mansign.cs
- StrokeSerializer.cs
- SerTrace.cs
- DataGridHelper.cs
- DbUpdateCommandTree.cs
- RuleConditionDialog.Designer.cs
- ServiceHostingEnvironment.cs
- peernodestatemanager.cs
- SqlTypeSystemProvider.cs
- SqlCacheDependencySection.cs
- x509utils.cs
- Parameter.cs
- ToolStripSplitButton.cs
- LabelDesigner.cs
- Attachment.cs
- WrapPanel.cs
- XmlQueryType.cs
- ClientType.cs
- RangeValuePattern.cs
- DataGridViewBand.cs
- ProcessModuleDesigner.cs
- ContentWrapperAttribute.cs
- altserialization.cs
- LongTypeConverter.cs
- TextParagraphView.cs
- FormViewDesigner.cs
- MarkupObject.cs
- SoapFormatterSinks.cs
- UIntPtr.cs
- DesignTimeSiteMapProvider.cs
- MouseGestureConverter.cs
- CatalogZone.cs