Show / Hide Table of Contents

Class ExportStreamWriter

An extended StreamWriter implementation to simplify language export writing.

Inheritance
System.Object
ExportStreamWriter
Namespace: Microsoft.Health.Fhir.SpecManager.Language
Assembly: Microsoft.Health.Fhir.SpecManager.dll
Syntax
public class ExportStreamWriter : StreamWriter

Constructors

| Improve this Doc View Source

ExportStreamWriter(Stream)

Initializes a new instance of the ExportStreamWriter class.

Declaration
public ExportStreamWriter(Stream stream)
Parameters
Type Name Description
Stream stream

The stream.

| Improve this Doc View Source

ExportStreamWriter(Stream, Encoding)

Initializes a new instance of the ExportStreamWriter class.

Declaration
public ExportStreamWriter(Stream stream, Encoding encoding)
Parameters
Type Name Description
Stream stream

The stream.

Encoding encoding

The encoding.

| Improve this Doc View Source

ExportStreamWriter(Stream, Encoding, Int32)

Initializes a new instance of the ExportStreamWriter class.

Declaration
public ExportStreamWriter(Stream stream, Encoding encoding, int bufferSize)
Parameters
Type Name Description
Stream stream

The stream.

Encoding encoding

The encoding.

System.Int32 bufferSize

Size of the buffer.

| Improve this Doc View Source

ExportStreamWriter(Stream, Encoding, Int32, Boolean)

Initializes a new instance of the ExportStreamWriter class.

Declaration
public ExportStreamWriter(Stream stream, Encoding encoding, int bufferSize, bool leaveOpen)
Parameters
Type Name Description
Stream stream

The stream.

Encoding encoding

The encoding.

System.Int32 bufferSize

Size of the buffer.

System.Boolean leaveOpen

True to leave open.

| Improve this Doc View Source

ExportStreamWriter(String)

Initializes a new instance of the ExportStreamWriter class.

Declaration
public ExportStreamWriter(string path)
Parameters
Type Name Description
System.String path

Full pathname of the file.

| Improve this Doc View Source

ExportStreamWriter(String, Boolean)

Initializes a new instance of the ExportStreamWriter class.

Declaration
public ExportStreamWriter(string path, bool append)
Parameters
Type Name Description
System.String path

Full pathname of the file.

System.Boolean append

True to append.

| Improve this Doc View Source

ExportStreamWriter(String, Boolean, Encoding)

Initializes a new instance of the ExportStreamWriter class.

Declaration
public ExportStreamWriter(string path, bool append, Encoding encoding)
Parameters
Type Name Description
System.String path

Full pathname of the file.

System.Boolean append

True to append.

Encoding encoding

The encoding.

| Improve this Doc View Source

ExportStreamWriter(String, Boolean, Encoding, Int32)

Initializes a new instance of the ExportStreamWriter class.

Declaration
public ExportStreamWriter(string path, bool append, Encoding encoding, int bufferSize)
Parameters
Type Name Description
System.String path

Full pathname of the file.

System.Boolean append

True to append.

Encoding encoding

The encoding.

System.Int32 bufferSize

Size of the buffer.

Properties

| Improve this Doc View Source

CharactersPerIndentation

Gets the characters per indentation level.

Declaration
public int CharactersPerIndentation { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Indentation

Gets the current level of indentation.

Declaration
public int Indentation { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

IndentationChar

Gets the indentation character.

Declaration
public char IndentationChar { get; }
Property Value
Type Description
System.Char

Methods

| Improve this Doc View Source

CloseScope(String)

Closes a scope (decreases indent, then writes literal on a line).

Declaration
public void CloseScope(string closeLiteral = "}")
Parameters
Type Name Description
System.String closeLiteral

(Optional) The close literal.

| Improve this Doc View Source

DecreaseIndent()

Decrease indent.

Declaration
public void DecreaseIndent()
| Improve this Doc View Source

IncreaseIndent()

Increase indent.

Declaration
public void IncreaseIndent()
| Improve this Doc View Source

OpenScope(String)

Opens a scope (writes literal on a line, then indents).

Declaration
public void OpenScope(string openLiteral = "{")
Parameters
Type Name Description
System.String openLiteral

(Optional) The scope open literal.

| Improve this Doc View Source

SetCharsPerIndentation(Int32)

Sets characters per indentation.

Declaration
public void SetCharsPerIndentation(int charsPerIndentLevel)
Parameters
Type Name Description
System.Int32 charsPerIndentLevel

The characters per indent level.

| Improve this Doc View Source

SetIndent(Int32)

Sets an indent.

Declaration
public void SetIndent(int level)
Parameters
Type Name Description
System.Int32 level

The level.

| Improve this Doc View Source

SetIndentationChar(Char)

Sets indentation character.

Declaration
public void SetIndentationChar(char indentChar)
Parameters
Type Name Description
System.Char indentChar

The indent character.

| Improve this Doc View Source

WriteIndented(String)

Writes a value, indented.

Declaration
public void WriteIndented(string value)
Parameters
Type Name Description
System.String value

The value.

| Improve this Doc View Source

WriteLineIndented(String)

Writes a line, indented per current indentation level.

Declaration
public void WriteLineIndented(string value)
Parameters
Type Name Description
System.String value

The value.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX