public void OpenAsyncThread(AsyncCallback call, object callParam, AppStruct appType) { var async = new AsyncRequestHelper(call, callParam, appType); new Thread(() => {//开启线程 string dir = new AssemblyExt().GetAppDir(appType); //此处应该增加日志记录功能 "Begin Call Async Thread".WriteLog(dir); //线程调度 async.SetComplate(string.Empty); //日志 记录结束标志 "End Call Async Thread".WriteLog(dir); }).Start(); }
/// <summary> /// 根据提供的程序类别(CS/BS获取程序对应目录) /// </summary> /// <param name="type"></param> /// <returns></returns> public string GetAppDir(AppStruct type) { string dir = string.Empty; switch (type) { case AppStruct.Web: dir = GetWebAssemblyPath(); break; case AppStruct.WinApp: dir = GetAssemblyPath(); break; default: break; } return(dir); }
public AsyncRequestHelper(AsyncCallback asyncCall, object state, AppStruct app) { _asyncCallBack = asyncCall; callParam = state; appType = app; }
public QuartzSchedule(AppStruct callClassOfAppType) { AssemblyExt ass = new AssemblyExt(); dir = ass.GetAppDir(callClassOfAppType); }