ServiceFacade Refactor
missing file
This commit is contained in:
@@ -301,46 +301,14 @@ namespace BeWo.ServiceProxy
|
||||
#endregion
|
||||
|
||||
#region GkvAccounting
|
||||
public static void DoGkvAccountingServiceAsync<T>(Func<IGkvAccountingService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
|
||||
{
|
||||
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallBack, showWaitDialog);
|
||||
}
|
||||
public static void DoGkvAccountingServiceAsync<T>(Func<IGkvAccountingService, T> pFunc, Action<T> pCallBack)
|
||||
{
|
||||
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallBack, true);
|
||||
}
|
||||
public static void DoGkvAccountingServiceAsync(Action<IGkvAccountingService> pAction, Action pCallBack)
|
||||
{
|
||||
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallBack, null, true, dispatcher);
|
||||
}
|
||||
public static void DoGkvAccountingServiceAsync(Action<IGkvAccountingService> pAction)
|
||||
{
|
||||
DoAsync<GkvAccountingServiceClient, IGkvAccountingService>(pAction, true);
|
||||
}
|
||||
public static void DoGkvAccountingServiceSync(Action<IGkvAccountingService> pAction)
|
||||
{
|
||||
try
|
||||
{
|
||||
pAction.Invoke(GetInstance<GkvAccountingServiceClient, IGkvAccountingService>());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ShowErrorMessage(e);
|
||||
}
|
||||
}
|
||||
=> DoSync<GkvAccountingServiceClient, IGkvAccountingService>(pAction);
|
||||
public static T DoGkvAccountingServiceSync<T>(Func<IGkvAccountingService, T> pFunc)
|
||||
{
|
||||
try
|
||||
{
|
||||
return pFunc.Invoke(GetInstance<GkvAccountingServiceClient, IGkvAccountingService>());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ShowErrorMessage(e);
|
||||
}
|
||||
|
||||
return default(T);
|
||||
}
|
||||
=> DoSync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc);
|
||||
public static void DoGkvAccountingServiceAsync(Action<IGkvAccountingService> pAction, Action pCallback = null, Action<Exception> pErrorCallback = null, bool showWaitDialog = true, UserControl caller = null)
|
||||
=> DoAsync<GkvAccountingServiceClient, IGkvAccountingService>(pAction, pCallback, pErrorCallback, showWaitDialog, caller?.Dispatcher);
|
||||
public static void DoGkvAccountingServiceAsync<T>(Func<IGkvAccountingService, T> pFunc, Action<T> pCallback = null, Action<Exception> pErrorCallback = null, bool showWaitDialog = true, UserControl caller = null)
|
||||
=> DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallback, pErrorCallback, showWaitDialog, caller?.Dispatcher);
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace BeWo.ServiceProxy
|
||||
});
|
||||
}
|
||||
|
||||
ServiceFacade.DoGkvAccountingServiceAsync<T>(pFunc, lCallBack, true);
|
||||
ServiceFacade.DoGkvAccountingServiceAsync<T>(pFunc, lCallBack);
|
||||
}
|
||||
|
||||
public static void DoGkvAccountingServiceAsync(this UserControl uc, Action<IGkvAccountingService> pAction, Action pCallBack = null, bool showWaitDialog = true)
|
||||
|
||||
Reference in New Issue
Block a user