C# Класс NArrange.Tests.CSharp.CSharpTestFile

C# test file information.
Наследование: ISourceCodeTestFile
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CSharpTestFile ( string resourceName, bool targetCSharp6 = false ) : System.CodeDom.Compiler

Creates a new test file using the specified resource.

Compile ( string source, bool targetCSharp6 = false ) : CompilerResults

Compiles C# source code.

GetReader ( ) : TextReader

Gets a TextReader for this test file.

GetTestFileReader ( string resourceName ) : TextReader

Retrieves a reader for the specified resource.

GetTestFileStream ( string resourceName ) : Stream

Opens a test file resource stream.

Приватные методы

Метод Описание
GetAssembly ( string resourceName, bool targetCSharp6 = false ) : Assembly

Gets the assembly.

Описание методов

CSharpTestFile() публичный Метод

Creates a new test file using the specified resource.
public CSharpTestFile ( string resourceName, bool targetCSharp6 = false ) : System.CodeDom.Compiler
resourceName string Name of the resource.
targetCSharp6 bool Set to true if C# 6 features are used. This will use the new Microsoft CodeDomCompiler, otherwise the old one is used.
Результат System.CodeDom.Compiler

Compile() публичный статический Метод

Compiles C# source code.
public static Compile ( string source, bool targetCSharp6 = false ) : CompilerResults
source string The source.
targetCSharp6 bool
Результат System.CodeDom.Compiler.CompilerResults

GetReader() публичный Метод

Gets a TextReader for this test file.
public GetReader ( ) : TextReader
Результат TextReader

GetTestFileReader() публичный статический Метод

Retrieves a reader for the specified resource.
public static GetTestFileReader ( string resourceName ) : TextReader
resourceName string Name of the resource.
Результат TextReader

GetTestFileStream() публичный статический Метод

Opens a test file resource stream.
public static GetTestFileStream ( string resourceName ) : Stream
resourceName string Name of the resource.
Результат System.IO.Stream