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
- Base64Stream.cs
- InternalControlCollection.cs
- TraceData.cs
- BreakRecordTable.cs
- InvalidCastException.cs
- WebContext.cs
- ListControl.cs
- PriorityRange.cs
- BCLDebug.cs
- BuildManagerHost.cs
- ControlValuePropertyAttribute.cs
- SoapObjectInfo.cs
- CompositionAdorner.cs
- Wizard.cs
- XmlSchemaSubstitutionGroup.cs
- SignedPkcs7.cs
- documentation.cs
- ItemType.cs
- StringUtil.cs
- SqlParameter.cs
- SendingRequestEventArgs.cs
- IDictionary.cs
- RecommendedAsConfigurableAttribute.cs
- TdsParserStateObject.cs
- MSAAWinEventWrap.cs
- BitmapEffect.cs
- GenericQueueSurrogate.cs
- BatchServiceHost.cs
- XmlComment.cs
- BasicCommandTreeVisitor.cs
- PropertyValueChangedEvent.cs
- CounterCreationData.cs
- EntityCommandDefinition.cs
- IUnknownConstantAttribute.cs
- ListBindingConverter.cs
- DocumentEventArgs.cs
- AttributeQuery.cs
- ServiceOperationInfoTypeConverter.cs
- CodeObjectCreateExpression.cs
- SineEase.cs
- ToolStripControlHost.cs
- SafeUserTokenHandle.cs
- UriTemplateEquivalenceComparer.cs
- Annotation.cs
- MailAddressCollection.cs
- VectorCollection.cs
- MinimizableAttributeTypeConverter.cs
- AnnotationComponentManager.cs
- GroupQuery.cs
- TraversalRequest.cs
- DataContract.cs
- EventLogPermissionEntryCollection.cs
- AssociationSetEnd.cs
- ReceiveReply.cs
- base64Transforms.cs
- SizeLimitedCache.cs
- SortDescription.cs
- SqlBulkCopyColumnMapping.cs
- HostVisual.cs
- ColumnMap.cs
- SignatureDescription.cs
- AutomationIdentifierGuids.cs
- StringComparer.cs
- DataSourceIDConverter.cs
- SystemPens.cs
- Function.cs
- Filter.cs
- ApplicationBuildProvider.cs
- MarshalDirectiveException.cs
- ContainerActivationHelper.cs
- UnsafeNativeMethods.cs
- CodeLinePragma.cs
- DeviceFilterEditorDialog.cs
- UnhandledExceptionEventArgs.cs
- BuildProviderAppliesToAttribute.cs
- OpCopier.cs
- Scheduler.cs
- TreeViewAutomationPeer.cs
- ToolBar.cs
- WindowPattern.cs
- ConnectionPointCookie.cs
- HotSpot.cs
- NavigationEventArgs.cs
- XmlSortKeyAccumulator.cs
- ConstrainedGroup.cs
- CodeMemberField.cs
- XPathScanner.cs
- StorageFunctionMapping.cs
- MailAddressCollection.cs
- BitFlagsGenerator.cs
- PropertyGridCommands.cs
- BitmapCodecInfo.cs
- RuntimeEnvironment.cs
- ResourceDescriptionAttribute.cs
- DataPointer.cs
- DbReferenceCollection.cs
- ReflectionUtil.cs
- SqlTypesSchemaImporter.cs
- ExpressionValueEditor.cs
- TreeNodeBindingCollection.cs