Revision | e14cdd7e045c10524eb1c004c19494754a47e2e4 (tree) |
---|---|
Zeit | 2022-06-05 00:39:06 |
Autor | yoshy <yoshy.org.bitbucket@gz.j...> |
Commiter | yoshy |
[MOD] UseCaseResponse のエラー取得系メソッドをプロパティ化
@@ -23,12 +23,12 @@ namespace CleanAuLait.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); |
@@ -48,20 +48,11 @@ | ||
48 | 48 | }; |
49 | 49 | } |
50 | 50 | |
51 | - public bool IsSuccess() | |
52 | - { | |
53 | - return (Result & UseCaseResultTypes.ABORTED) == 0; | |
54 | - } | |
51 | + public bool IsSuccess => (Result & UseCaseResultTypes.ABORTED) == 0; | |
55 | 52 | |
56 | - public bool IsAborted() | |
57 | - { | |
58 | - return (Result & UseCaseResultTypes.ABORTED) != 0; | |
59 | - } | |
53 | + public bool IsAborted => (Result & UseCaseResultTypes.ABORTED) != 0; | |
60 | 54 | |
61 | - public bool HasSomeErrors() | |
62 | - { | |
63 | - return (Result & UseCaseResultTypes.SOME_ERRORS_IGNORED) != 0; | |
64 | - } | |
55 | + public bool HasSomeErrors => (Result & UseCaseResultTypes.SOME_ERRORS_IGNORED) != 0; | |
65 | 56 | |
66 | 57 | } |
67 | 58 | } |