/// <summary> /// ����ģ��������Ϣ /// </summary> /// <param name="completed">The completed.</param> public void DownloadModuleInfo(ServiceCompleted<AfterDownloadModuleInfoEvent> completed) { _logger.Log("��ʼ��������ģ��������Ϣ", Category.Debug, Priority.Medium); var @event = SentRequestEvent.CreateRequestEvent("Service/System.json/DownXamlModuleInfo"); @event.Result = (a, b) => { var downloadEvent = new AfterDownloadModuleInfoEvent(b.GetPostData<string>()); _eventAggregator.Publish(downloadEvent); completed(downloadEvent, @event); _logger.Log("���ģ������������Ϣ", Category.Debug, Priority.Medium); }; _eventAggregator.Publish(@event); }
public void GetSystemRootSecurityAction(ServiceCompleted<ISecurityAction> serviceCompleted) { var @event = SentRequestEvent.CreateRequestEvent("Account.json/GetSystemRootSercurityAction", null); @event.Result = (a, b) => serviceCompleted(b.GetPostData<SecurityAction>(), a); EventAggregator.Publish(@event); }
//public void GetUserSetting(ServiceCompleted<Users>) public void GetRootRole(ServiceCompleted<IRole> serviceCompleted) { var @event = SentRequestEvent.CreateRequestEvent("Account.json/GetSystemRootRole", null); @event.Result = (a, b) => serviceCompleted(b.GetPostData<Role>(), a); EventAggregator.Publish(@event); }
/// <summary> /// Gets the user. /// </summary> /// <param name="serviceCompleted">The service completed.</param> public void GetCurrentUser(ServiceCompleted<IUser> serviceCompleted) { var @event = SentRequestEvent.CreateRequestEvent("Account.json/GetCurrentUser", null); @event.Result = (a, b) => serviceCompleted(b.GetPostData<User>(), a); EventAggregator.Publish(@event); }
/// <summary> /// 通知服务运行完毕 /// </summary> protected virtual void OnServiceCompleted() { ServiceCompleted?.Invoke(); }
/// <summary> /// �ϴ�ģ����·�����ģ����Ϣ /// </summary> /// <param name="moduleFile">The module file.</param> /// <param name="completed">The completed.</param> public void UploadModuleFile(ModuleFile moduleFile, ServiceCompleted<bool> completed) { var @event = SentRequestEvent.CreateRequestEvent("Service/System.json/UploadModuleFile", moduleFile); @event.Result = (a, b) => completed.Invoke(b.GetPostData<bool>(), @event); _eventAggregator.Publish(@event); }