Show / Hide Table of Contents

Class ZipResources

Resources stored in a ZipArchive

Inheritance
Object
ZipResources
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 ZipResources : IReadOnlyResources, IDisposable

Constructors

| Improve this Doc View Source

ZipResources(String)

Opens the ZipArchive located at archiveFilePath. The archive will remain opened until Dispose() is called

Declaration
public ZipResources(string archiveFilePath)
Parameters
Type Name Description
String archiveFilePath

full or relative path to the zip archive file

Exceptions
Type Condition
ArgumentException

archiveFilePath is null or empty

FileLoadException

archiveFilePath cannot be opened as a ZipArchive

Methods

| Improve this Doc View Source

Dispose()

Dispose() Disposes the underlying ZipArchive
Declaration
public void Dispose()
Implements
IDisposable.Dispose()
| 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

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
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX