Class FileResult
Class FileResult.
Inheritance
System.Object
FileResult
Namespace: ISynergy.Framework.Mvvm.Models
Assembly: ISynergy.Framework.Mvvm.dll
Syntax
public sealed class FileResult : IDisposable
Constructors
View SourceFileResult(String, String, Func<Stream>, Action<Boolean>)
Initializes a new instance of the FileResult class.
Declaration
public FileResult(string filePath, string fileName, Func<Stream> streamGetter, Action<bool> dispose = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The file path. |
System.String | fileName | Name of the file. |
Func<Stream> | streamGetter | The stream getter. |
Action<System.Boolean> | dispose | The dispose. |
Properties
View SourceFile
Gets or sets the file.
Declaration
public byte[] File { get; }
Property Value
Type | Description |
---|---|
System.Byte[] | The file. |
FileName
Filename of the picked file, without path
Declaration
public string FileName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the file. |
FilePath
Full filepath of the picked file. Note that on specific platforms this can also contain an URI that can't be opened with file related APIs. Use DataArray property or GetStream() method in this cases.
Declaration
public string FilePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The file path. |
Methods
View SourceDispose()
Disposes of all resources in the object
Declaration
public void Dispose()
Finalize()
Finalizer for this object
Declaration
protected void Finalize()
GetStream()
Gets stream to access the picked file. Note that when DataArray property was already accessed, the stream must be rewinded to the beginning.
Declaration
public Stream GetStream()
Returns
Type | Description |
---|---|
Stream | stream object |