protected virtual ValueTask<ValidationResult> EnsureContentDownloadedCoreAsync(
IFileObject obj,
Func<IFileObject, FileContentDownloadState>? getStateFunc,
Func<FileContentDownloadState, CancellationToken, ValueTask>? setStateActionAsync,
Func<IFileObject, CancellationToken, ValueTask<IFileContent>>? getContentFuncAsync = null,
CancellationToken cancellationToken = default
)
Protected Overridable Function EnsureContentDownloadedCoreAsync (
obj As IFileObject,
getStateFunc As Func(Of IFileObject, FileContentDownloadState),
setStateActionAsync As Func(Of FileContentDownloadState, CancellationToken, ValueTask),
Optional getContentFuncAsync As Func(Of IFileObject, CancellationToken, ValueTask(Of IFileContent)) = Nothing,
Optional cancellationToken As CancellationToken = Nothing
) As ValueTask(Of ValidationResult)
protected:
virtual ValueTask<ValidationResult^> EnsureContentDownloadedCoreAsync(
IFileObject^ obj,
Func<IFileObject^, FileContentDownloadState>^ getStateFunc,
Func<FileContentDownloadState, CancellationToken, ValueTask>^ setStateActionAsync,
Func<IFileObject^, CancellationToken, ValueTask<IFileContent^>>^ getContentFuncAsync = nullptr,
CancellationToken cancellationToken = CancellationToken()
)
abstract EnsureContentDownloadedCoreAsync :
obj : IFileObject *
getStateFunc : Func<IFileObject, FileContentDownloadState> *
setStateActionAsync : Func<FileContentDownloadState, CancellationToken, ValueTask> *
?getContentFuncAsync : Func<IFileObject, CancellationToken, ValueTask<IFileContent>> *
?cancellationToken : CancellationToken
(* Defaults:
let _getContentFuncAsync = defaultArg getContentFuncAsync null
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask<ValidationResult>
override EnsureContentDownloadedCoreAsync :
obj : IFileObject *
getStateFunc : Func<IFileObject, FileContentDownloadState> *
setStateActionAsync : Func<FileContentDownloadState, CancellationToken, ValueTask> *
?getContentFuncAsync : Func<IFileObject, CancellationToken, ValueTask<IFileContent>> *
?cancellationToken : CancellationToken
(* Defaults:
let _getContentFuncAsync = defaultArg getContentFuncAsync null
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask<ValidationResult>
Метод, устанавливающий состояние загружаемого контента, или null, если состояние контента устанавливается непосредственно на свойстве ContentState.
Устанавливать параметр отличным от null значением есть смысл при асинхронной загрузке контента, когда состояние должно быть установлено в потоке UI.