Show / Hide Table of Contents

Class FileSystemResources

Resources stores on the file system and accesible via File

Inheritance
Object
FileSystemResources
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: FakeHttp.Resources
Assembly: FakeHttp.dll
Syntax
public sealed class FileSystemResources : IResources, IReadOnlyResources

Constructors

| Improve this Doc View Source

FileSystemResources(String)

Declaration
public FileSystemResources(string storeFolder)
Parameters
Type Name Description
String storeFolder

The root folder where resources reside

Exceptions
Type Condition
ArgumentException

If storeFolder is null or empty

Methods

| Improve this Doc View Source

Exists(String, String)

Checks whether the specified file exists

Declaration
public bool Exists(string folder, string fileName)
Parameters
Type Name Description
String folder

The folder name

String fileName

The file name

Returns
Type Description
Boolean

Flag indicating whether file exists

Implements
IReadOnlyResources.Exists(String, String)
| Improve this Doc View Source

LoadAsStream(String, String)

Loads a given file as a stream

Declaration
public Stream LoadAsStream(string folder, string fileName)
Parameters
Type Name Description
String folder

The folder name

String fileName

The file name

Returns
Type Description
Stream

The file's contents as a Stream

Implements
IReadOnlyResources.LoadAsStream(String, String)
Exceptions
Type Condition
FileLoadException
| Improve this Doc View Source

LoadAsString(String, String)

Loads a given file as a string

Declaration
public string LoadAsString(string folder, string fileName)
Parameters
Type Name Description
String folder

The folder name

String fileName

The file name

Returns
Type Description
String

The file's contents as a String

Implements
IReadOnlyResources.LoadAsString(String, String)
Exceptions
Type Condition
FileLoadException
| Improve this Doc View Source

Store(String, String, Stream)

Stores a data stream in the corresponding folder and file

Declaration
public void Store(string folder, string fileName, Stream data)
Parameters
Type Name Description
String folder

The folder name

String fileName

The file name

Stream data

The data to store

Implements
IResources.Store(String, String, Stream)
Exceptions
Type Condition
IOException
| Improve this Doc View Source

Store(String, String, String)

Stores a data string in the corresponding folder and file

Declaration
public void Store(string folder, string fileName, string data)
Parameters
Type Name Description
String folder

The folder name

String fileName

The file name

String data

The data to store

Implements
IResources.Store(String, String, String)
Exceptions
Type Condition
IOException
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX