Revision | 57aed83181d8a3ec04095600d75d41de3abd5713 (tree) |
---|---|
Zeit | 2022-06-05 00:39:18 |
Autor | yoshy <yoshy.org.bitbucket@gz.j...> |
Commiter | yoshy |
[MOD] UseCaseResponse のエラー取得系メソッドをプロパティ化
@@ -23,12 +23,12 @@ namespace CleanAuLait48.Adaptor.Controller.Handler | ||
23 | 23 | |
24 | 24 | //string statusText = !String.IsNullOrEmpty(res.Message) ? res.Message : AppConst.STATUS_BAR_READY; |
25 | 25 | |
26 | - if (res.HasSomeErrors()) | |
26 | + if (res.HasSomeErrors) | |
27 | 27 | { |
28 | 28 | //dialog.ShowError(res.Message, req.UIInfo); |
29 | 29 | dialog.ShowError(res.Message); |
30 | 30 | } |
31 | - else if (res.IsAborted()) | |
31 | + else if (res.IsAborted) | |
32 | 32 | { |
33 | 33 | //dialog.ShowInfo(res.Message, req.UIInfo); |
34 | 34 | dialog.ShowInfo(res.Message); |
@@ -57,20 +57,11 @@ | ||
57 | 57 | }; |
58 | 58 | } |
59 | 59 | |
60 | - public bool IsSuccess() | |
61 | - { | |
62 | - return (Result & UseCaseResultTypes.ABORTED) == 0; | |
63 | - } | |
60 | + public bool IsSuccess => (Result & UseCaseResultTypes.ABORTED) == 0; | |
64 | 61 | |
65 | - public bool IsAborted() | |
66 | - { | |
67 | - return (Result & UseCaseResultTypes.ABORTED) != 0; | |
68 | - } | |
62 | + public bool IsAborted => (Result & UseCaseResultTypes.ABORTED) != 0; | |
69 | 63 | |
70 | - public bool HasSomeErrors() | |
71 | - { | |
72 | - return (Result & UseCaseResultTypes.SOME_ERRORS_IGNORED) != 0; | |
73 | - } | |
64 | + public bool HasSomeErrors => (Result & UseCaseResultTypes.SOME_ERRORS_IGNORED) != 0; | |
74 | 65 | |
75 | 66 | } |
76 | 67 | } |