Class AssemblyResources
Resources that reside as embedded resources in a Assembly
Inherited Members
Namespace: FakeHttp.Resources
Assembly: FakeHttp.dll
Syntax
public sealed class AssemblyResources : IReadOnlyResources
Constructors
| Improve this Doc View SourceAssemblyResources(Assembly)
ctor
Declaration
public AssemblyResources(Assembly assembly)
Parameters
| Type | Name | Description |
|---|---|---|
| Assembly | assembly | Assembly with response files stored as embedded resources |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
Methods
| Improve this Doc View SourceExists(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
| Improve this Doc View SourceLoadAsStream(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 | File's contents as a stream |
Implements
Exceptions
| Type | Condition |
|---|---|
| FileLoadException |
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
Exceptions
| Type | Condition |
|---|---|
| FileLoadException |