C# Класс System.IO.Abstractions.TestingHelpers.MockFileData

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
DefaultDateTimeOffset DateTimeOffset
DefaultEncoding System.Text.Encoding
NullObject MockFileData

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

Метод Описание
MockFileData ( byte contents ) : System.Linq

Initializes a new instance of the MockFileData class with the content of contents.

MockFileData ( string textContents ) : System.Linq

Initializes a new instance of the MockFileData class with the content of textContents using the encoding of DefaultEncoding.

MockFileData ( string textContents, Encoding encoding ) : System.Linq

Initializes a new instance of the MockFileData class with the content of textContents using the encoding of encoding.

The constructor respect the BOM of encoding.

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

Метод Описание
MockFileData ( ) : System.Linq

Initializes a new instance of the MockFileData class with an empty content.

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

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

Initializes a new instance of the MockFileData class with the content of contents.
Thrown if is .
public MockFileData ( byte contents ) : System.Linq
contents byte The actual content.
Результат System.Linq

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

Initializes a new instance of the MockFileData class with the content of textContents using the encoding of DefaultEncoding.
public MockFileData ( string textContents ) : System.Linq
textContents string The textual content encoded into bytes with .
Результат System.Linq

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

Initializes a new instance of the MockFileData class with the content of textContents using the encoding of encoding.
The constructor respect the BOM of encoding.
public MockFileData ( string textContents, Encoding encoding ) : System.Linq
textContents string The textual content.
encoding System.Text.Encoding The specific encoding used the encode the text.
Результат System.Linq

Описание свойств

DefaultDateTimeOffset публичное статическое свойство

Gets the default date time offset. E.g. for not existing files.
public static DateTimeOffset DefaultDateTimeOffset
Результат DateTimeOffset

DefaultEncoding публичное статическое свойство

The default encoding.
public static Encoding,System.Text DefaultEncoding
Результат System.Text.Encoding

NullObject публичное статическое свойство

The null object.
public static MockFileData,System.IO.Abstractions.TestingHelpers NullObject
Результат MockFileData