Class FileProxy
- Namespace
- MarymoorStudios.Core.Promises.IO
- Assembly
- MarymoorStudios.Core.Promises.IO.dll
public sealed class FileProxy : Proxy<FileServer>, IProxy<FileProxy, FileServer>
- Inheritance
-
FileProxy
- Implements
- Inherited Members
- Extension Methods
Constructors
FileProxy(FileServer)
Creates a successfully resolved promise.
public FileProxy(FileServer value)
Parameters
value
FileServer
FileProxy(Promise<FileServer>)
Creates a forwarded promise whose outcome will be the same as p
.
public FileProxy(Promise<FileServer> p)
Parameters
FileProxy(Resolver<FileServer>)
Creates an unresolved promise whose future outcome is defined by r
.
public FileProxy(Resolver<FileServer> r)
Parameters
FileProxy(Proxy<FileServer>)
Creates a forwarded promise whose outcome will be the same as p
.
public FileProxy(Proxy<FileServer> p)
Parameters
p
Proxy<FileServer>
FileProxy(Exception)
Creates a failed promise whose outcome is ex
.
public FileProxy(Exception ex)
Parameters
ex
Exception
Methods
DisposeAsync()
public Promise DisposeAsync()
Returns
GetSize()
public Promise<long> GetSize()
Returns
Read(ulong, int)
public Promise<OwnedMem<byte>> Read(ulong offset, int length = -1)
Parameters
Returns
ReadBytes(ulong, long)
public Bytes ReadBytes(ulong offset = 0, long length = -1)
Parameters
Returns
Write(ReadOnlyMemory<byte>, ulong)
public Promise Write(ReadOnlyMemory<byte> buffer, ulong offset)
Parameters
buffer
ReadOnlyMemory<byte>offset
ulong
Returns
WriteBytes(Bytes, ulong)
public Promise WriteBytes(Bytes content, ulong offset = 0)
Parameters
Returns
Operators
implicit operator FileProxy(Promise<FileProxy>)
Implicit conversion to its syntax.
public static implicit operator FileProxy(Promise<FileProxy> p)
Parameters
Returns
Explicit Interface Implementations
Create(FileServer)
Creates a successfully resolved promise.
static FileProxy Create(FileServer value)
Parameters
value
FileServer
Returns
Create(Promise<FileServer>)
Creates a forwarded promise whose outcome will be the same as p
.
static FileProxy Create(Promise<FileServer> p)
Parameters
Returns
Create(Resolver<FileServer>)
Creates an unresolved promise whose future outcome is defined by r
.
static FileProxy Create(Resolver<FileServer> r)
Parameters
Returns
Create(Proxy<FileServer>)
Creates a forwarded promise whose outcome will be the same as p
.
static FileProxy Create(Proxy<FileServer> p)
Parameters
p
Proxy<FileServer>
Returns
Create(Exception)
Creates a failed promise whose outcome is ex
.
static FileProxy Create(Exception ex)
Parameters
ex
Exception