Interface IFileService<T>
Interface IFileService
Namespace: ISynergy.Framework.Mvvm.Abstractions.Services
Assembly: ISynergy.Framework.Mvvm.dll
Syntax
public interface IFileService<T>
Type Parameters
Name | Description |
---|---|
T |
Methods
View SourceBrowseFileAsync(String, Boolean, Int64)
Browses the file asynchronous.
Declaration
Task<List<T>> BrowseFileAsync(string filefilter, bool multiple = false, long maxFileSize = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | filefilter | The filefilter. |
System.Boolean | multiple | |
System.Int64 | maxFileSize | Maximum filesize, default 1Mb (1 * 1024 * 1024) |
Returns
Type | Description |
---|---|
Task<List<T>> | Task<FileResult>. |
BrowseImageAsync(String[], Int64)
Browses the image asynchronous.
Declaration
Task<byte[]> BrowseImageAsync(string[] filter, long maxFileSize = null)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | filter | |
System.Int64 | maxFileSize | Maximum filesize, default 1Mb (1 * 1024 * 1024) |
Returns
Type | Description |
---|---|
Task<System.Byte[]> | Task<System.Byte[]>. |
OpenFileAsync(String)
UWP implementation of OpenFile(), opening a file already stored in the app's local folder directory. storage.
Declaration
Task OpenFileAsync(string fileToOpen)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileToOpen | relative filename of file to open |
Returns
Type | Description |
---|---|
Task |
SaveFileAsync(String, String, Byte[])
Saves the file asynchronous.
Declaration
Task<T> SaveFileAsync(string folder, string filename, byte[] file)
Parameters
Type | Name | Description |
---|---|---|
System.String | folder | |
System.String | filename | The filename. |
System.Byte[] | file | The file. |
Returns
Type | Description |
---|---|
Task<T> | Task<System.Boolean>. |