Table of Contents

Interface IDialogMessageService

Namespace
H.Services.Message.Dialog
Assembly
H.Services.Message.dll

对话框消息服务接口

public interface IDialogMessageService
Extension Methods

Methods

Show(object, Action<IDialog>, Func<Task<bool>>)

显示对话框

Task<bool?> Show(object presenter, Action<IDialog> builder = null, Func<Task<bool>> canSumit = null)

Parameters

presenter object

对话框的呈现者

builder Action<IDialog>

对话框构建器

canSumit Func<Task<bool>>

确定按钮是否可用的条件

Returns

Task<bool?>

对话框的结果

ShowAction<P, T>(P, Action<IDialog>, Func<IDialog, P, T>)

显示带操作的对话框

Task<T> ShowAction<P, T>(P presenter, Action<IDialog> builder = null, Func<IDialog, P, T> action = null)

Parameters

presenter P

对话框的呈现者

builder Action<IDialog>

对话框构建器

action Func<IDialog, P, T>

对话框操作的委托

Returns

Task<T>

对话框的操作结果

Type Parameters

P

呈现者的类型

T

操作结果的类型

ShowForeach<T>(Func<IEnumerable<T>>, Func<T, Tuple<bool, string>>, Action<IDialog>)

显示循环对话框

Task<bool> ShowForeach<T>(Func<IEnumerable<T>> getList, Func<T, Tuple<bool, string>> itemAction, Action<IDialog> build = null)

Parameters

getList Func<IEnumerable<T>>

获取列表的委托

itemAction Func<T, Tuple<bool, string>>

列表项操作的委托

build Action<IDialog>

对话框构建器

Returns

Task<bool>

对话框的操作结果

Type Parameters

T

列表项的类型

ShowPercent<T>(Func<IDialog, IPercentPresenter, T>, Action<IDialog>)

显示百分比对话框

Task<T> ShowPercent<T>(Func<IDialog, IPercentPresenter, T> action, Action<IDialog> build = null)

Parameters

action Func<IDialog, IPercentPresenter, T>

百分比对话框操作的委托

build Action<IDialog>

对话框构建器

Returns

Task<T>

对话框的操作结果

Type Parameters

T

操作结果的类型

ShowString<T>(Func<IDialog, IStringPresenter, T>, Action<IDialog>)

显示字符串对话框

Task<T> ShowString<T>(Func<IDialog, IStringPresenter, T> action, Action<IDialog> build = null)

Parameters

action Func<IDialog, IStringPresenter, T>

字符串对话框操作的委托

build Action<IDialog>

对话框构建器

Returns

Task<T>

对话框的操作结果

Type Parameters

T

操作结果的类型

ShowWait<T>(Func<IDialog, T>, Action<IDialog>)

显示等待对话框

Task<T> ShowWait<T>(Func<IDialog, T> action, Action<IDialog> build = null)

Parameters

action Func<IDialog, T>

等待对话框操作的委托

build Action<IDialog>

对话框构建器

Returns

Task<T>

对话框的操作结果

Type Parameters

T

操作结果的类型