ViewFilePersistentWriteAsync - метод |
Осуществляет запись моделей представлений в папку
Пространство имён:
Tessa.Views.Parser.Serialization
Сборка:
Tessa (в Tessa.dll) Версия: 3.5.0.19
Синтаксис public Task WriteAsync(
[NotNullAttribute] IEnumerable<TessaViewModel> models,
[NotNullAttribute] string path,
bool clearFolder = false,
[CanBeNullAttribute] string userName = ""
)
Public Function WriteAsync (
<NotNullAttribute> models As IEnumerable(Of TessaViewModel),
<NotNullAttribute> path As String,
Optional clearFolder As Boolean = false,
<CanBeNullAttribute> Optional userName As String = ""
) As Task
public:
Task^ WriteAsync(
[NotNullAttribute] IEnumerable<TessaViewModel^>^ models,
[NotNullAttribute] String^ path,
bool clearFolder = false,
[CanBeNullAttribute] String^ userName = L""
)
member WriteAsync :
[<NotNullAttribute>] models : IEnumerable<TessaViewModel> *
[<NotNullAttribute>] path : string *
?clearFolder : bool *
[<CanBeNullAttribute>] ?userName : string
(* Defaults:
let _clearFolder = defaultArg clearFolder false
let _userName = defaultArg userName ""
*)
-> Task
Параметры
- models
- Тип: System.Collections.GenericIEnumerableTessaViewModel
Список записываемых моделей
- path
- Тип: SystemString
Путь к каталогу
- clearFolder (Optional)
- Тип: SystemBoolean
Признак необходимости очистки каталога path от файлов представлений
- userName (Optional)
- Тип: SystemString
Имя пользователя осуществляющего запись информации
Возвращаемое значение
Тип:
TaskИсключения Исключение | Условие |
---|
SecurityException |
The caller does not have the required permission.
|
FileNotFoundException |
The file cannot be found, such as when mode is
FileMode.Truncate or FileMode.Open, and the file specified by path does not exist. The file
must already exist in these modes.
|
IOException |
An I/O error, such as specifying FileMode.CreateNew when the file specified by
path already exists, occurred.-or-The stream has been closed.
|
DirectoryNotFoundException |
The specified path is invalid, such as being on an unmapped drive.
|
ArgumentException | path is an empty string (""), contains only white space, or contains one or more invalid
characters. -or-path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in an
NTFS environment.
|
NotSupportedException | path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in a non-NTFS
environment.
|
ArgumentNullException | path is null.
|
PathTooLongException |
The specified path, file name, or both exceed the system-defined maximum length.
For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than
260 characters.
|
ArgumentOutOfRangeException |
contains an invalid value.
|
См. также