Table of Contents

Class CSharpGeneratedFile

Namespace
TypedRest.CodeGeneration.CSharp
Assembly
TypedRest.CodeGeneration.CSharp.dll

Exposes a generated C# type as an IGeneratedFile.

public class CSharpGeneratedFile : IGeneratedFile
Inheritance
object
CSharpGeneratedFile
Implements
Extension Methods

Constructors

CSharpGeneratedFile(ICSharpType)

Exposes a generated C# type as an IGeneratedFile.

public CSharpGeneratedFile(ICSharpType type)

Parameters

type ICSharpType

The type to write.

Properties

Encoding

The encoding to use when writing the file to disk.

public Encoding Encoding { get; }

Property Value

Encoding

Remarks

UTF-8 with a byte order mark, matching WriteToFile(ICSharpType, string).

Path

The path of the file relative to the output directory, using / as the separator, including the extension.

public string Path { get; }

Property Value

string

Type

The type written by this file.

public ICSharpType Type { get; }

Property Value

ICSharpType

Methods

WriteTo(TextWriter)

Writes the content of the file.

public void WriteTo(TextWriter writer)

Parameters

writer TextWriter