Table of Contents

Class ByteArrayFileService

Namespace
AsmResolver.IO
Assembly
AsmResolver.dll

Provides an implementation of a IFileService that uses instances of ByteArrayInputFile to represent opened files, and keeps track of any of the instances it creates.

public class ByteArrayFileService : IFileService, IDisposable
Inheritance
ByteArrayFileService
Implements
Inherited Members

Methods

GetOpenedFiles()

Gets a collection of files currently opened by this file service.

public IEnumerable<string> GetOpenedFiles()

Returns

IEnumerable<string>

The paths of the files that were opened.

InvalidateFile(string)

If the provided file path was opened by this file service, closes the provided file and removes it from the cache.

public void InvalidateFile(string filePath)

Parameters

filePath string

The path of the file to close.

OpenBytesAsFile(string, byte[])

Assigns a file path to a byte array and opens it.

public IInputFile OpenBytesAsFile(string filePath, byte[] contents)

Parameters

filePath string

The file path.

contents byte[]

The contents of the file.

Returns

IInputFile

The opened file.

OpenFile(string)

Opens a file at the provided file path.

public IInputFile OpenFile(string filePath)

Parameters

filePath string

The path to the file to open.

Returns

IInputFile

The opened file.