public ViewEventPublicationParameter(object[] @params, IStateEventInfo processInfo, ISystemProcess process, ISystemSource source) { Params = @params; Process = process; Source = source; ProcessInfo = processInfo; }
public ComplexEventService(string actorId, IComplexEventAction complexEventAction, ISystemProcess process, ISystemSource source) { ComplexEventAction = complexEventAction; Process = process; Source = source; ActorId = actorId; }
public ViewEventCommandParameter(object[] @params, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) { Params = @params; Process = process; Source = source; ProcessInfo = processInfo; }
public ServiceManager(bool autoRun, List <IMachineInfo> machineInfos, List <IProcessInfo> processInfos, List <IComplexEventAction> complexEventActions, List <IViewModelInfo> viewModelInfos) { try { var ctx = Context; var machineInfo = machineInfos.FirstOrDefault( x => x.MachineName == Environment.MachineName && x.Processors == Environment.ProcessorCount); if (machineInfo == null) { return; } var processInfo = processInfos.FirstOrDefault(x => x.ParentProcessId == 0); if (processInfo == null) { return; } var systemProcess = new SystemProcess(new RevolutionEntities.Process.Process(processInfo, new Agent("System")), machineInfo); Source = new Source(Guid.NewGuid(), "ServiceManager", new SourceType(typeof(IServiceManager)), systemProcess, machineInfo); var systemStartedMsg = new SystemStarted(new StateEventInfo(systemProcess.Id, RevolutionData.Context.Process.Events.ProcessStarted), systemProcess, Source); EventMessageBus.Current.GetEvent <IServiceStarted <IProcessService> >(Source).Where(x => x.Process.Id == 1)//only start up process .Subscribe(async x => { var child = Context.Child("ViewModelSupervisor"); if (!Equals(child, ActorRefs.Nobody)) { return; } await Task.Run(() => ctx.ActorOf(Props.Create <ViewModelSupervisor>(viewModelInfos, systemProcess, systemStartedMsg), "ViewModelSupervisor")).ConfigureAwait(false); await Task.Run(() => ctx.ActorOf(Props.Create <EntityDataServiceManager>(systemProcess), "EntityDataServiceManager")).ConfigureAwait(false); await Task.Run(() => ctx.ActorOf(Props.Create <EntityViewDataServiceManager>(systemProcess), "EntityViewDataServiceManager")).ConfigureAwait(false); EventMessageBus.Current.Publish( new ServiceStarted <IServiceManager>(this, new StateEventInfo(systemProcess.Id, RevolutionData.Context.Actor.Events.ActorStarted), systemProcess, Source), Source); }); Task.Run(() => ctx.ActorOf(Props.Create <ProcessSupervisor>(autoRun, systemStartedMsg, processInfos, complexEventActions), "ProcessSupervisor")).ConfigureAwait(false); } catch (Exception ex) { Debugger.Break(); EventMessageBus.Current.Publish(new ProcessEventFailure(failedEventType: typeof(ServiceStarted <IServiceManager>), failedEventMessage: null, expectedEventType: typeof(ServiceStarted <IServiceManager>), exception: ex, source: Source, processInfo: new StateEventInfo(1, RevolutionData.Context.Process.Events.Error)), Source); } }
protected BaseViewModel(ISystemProcess process, IViewInfo viewInfo, List <IViewModelEventSubscription <IViewModel, IEvent> > eventSubscriptions, List <IViewModelEventPublication <IViewModel, IEvent> > eventPublications, List <IViewModelEventCommand <IViewModel, IEvent> > commandInfo, Type orientation, int priority) { if (LicenseManager.UsageMode == LicenseUsageMode.Designtime) { return; } Source = new Source(Guid.NewGuid(), "ViewModel:" + typeof(TViewModel).GetFriendlyName(), new SourceType(typeof(BaseViewModel <TViewModel>)), process, process.MachineInfo); Process = process; EventSubscriptions = eventSubscriptions; EventPublications = eventPublications; CommandInfo = commandInfo; Orientation = orientation; Priority = priority; ViewInfo = viewInfo; ViewModelType = typeof(TViewModel); RowState = new ReactiveProperty <RowState>(SystemInterfaces.RowState.Loaded); }
public GetMedia(List <int> mediaIdList, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { Contract.Requires(mediaIdList != null && mediaIdList.Any()); MediaIdList = mediaIdList; }
public CreateEntityService(Type actorType, object action, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { ActorType = actorType; Action = action; ProcessInfo = processInfo; }
public LoadEntitySetWithFilter(List <Expression <Func <T, bool> > > filter, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { Contract.Requires(filter != null); Filter = filter; }
public LoadEntityRange(int startIndex, int count, string filterExpression, Dictionary <string, string> navExp, IEnumerable <string> includesLst, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { StartIndex = startIndex; Count = count; FilterExpression = filterExpression; NavExp = navExp; IncludesLst = includesLst; }
public static List <IComplexEventLog> CreatEventLogs(this ImmutableList <IProcessSystemMessage> msgList, ISystemSource source) { try { return(msgList.Select( xevent => new ComplexEventLog(operation: $"Output Message:<{xevent.GetType().GetFriendlyName()}>", status: "Raised", time: xevent.MessageDateTime, sourceGuid: xevent.Source.SourceId.ToString(), sourceName: xevent.Source.SourceName, source: xevent.Source.SourceType.Source_Type.GetFriendlyName(), expectedSource: source.SourceType.Source_Type.GetFriendlyName(), message: "" // ToDo: Check out circular differnece //new JavaScriptSerializer().Serialize(new //{ // d = xevent.GetDerivedProperties() //}) , processInfo: new JavaScriptSerializer().Serialize(xevent.ProcessInfo))) .Cast <IComplexEventLog>() .ToList()); } catch (Exception) { throw; } }
public UpdateProcessStateList(IProcessStateList <TEntity> state, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { State = state; }
public EntityNotFound(int entityId, IStateEventInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { EntityId = entityId; }
public SystemMessage(IMachineInfo machineInfo, ISystemSource source) { Source = source; MessageDateTime = DateTime.Now; MachineInfo = machineInfo; }
public RequestProcessLog(IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { }
public ViewModelUnloaded(TViewModel viewModel, IStateEventInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { ViewModel = viewModel; }
public SystemProcessStarted(IStateEventInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { }
public GetEntityViewWithChanges(Dictionary <string, dynamic> changes, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { Changes = changes; }
public UpdateEntityWithChanges(int entityId, Dictionary <string, dynamic> changes, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { Contract.Requires(changes.Count > 0); EntityId = entityId; Changes = changes; }
public ComplexEventLogCreated(IEnumerable <IComplexEventLog> logs, IStateEventInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { EventLog = logs; }
public EntitySetWithFilterLoaded(IList <TEntity> entities, IStateEventInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { Entities = entities; }
public LoadEntityViewSetWithFilter(Expression <Func <T, bool> > filter, Expression func, Type viewType, Type viewDbType, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { try { Filter = filter; Expression = func; ViewType = viewType; ViewDbType = viewDbType; } catch (Exception) { throw; } }
public ProcessSystemMessage(IProcessStateInfo processInfo, ISystemProcess process, ISystemSource source) : base(source.MachineInfo, source) { Process = process; ProcessInfo = processInfo; ParentProcessId = Process.ParentProcessId; Name = process.Name; Description = process.Description; Symbol = process.Symbol; User = process.User; Id = process.Id; }
public NavigateToView(string view, IProcessStateInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { View = view; }
public FailedMessageData(dynamic data, IStateEventInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { Data = data; }
public static List <IComplexEventLog> CreatEventLogs(this IList <IProcessExpectedEvent> msgList, Dictionary <string, IProcessSystemMessage> inMessages, ISystemSource source) { try { return(msgList.Select( xevent => new ComplexEventLog(operation: $"Expected Message:<{xevent.EventType}>", status: inMessages.ContainsKey(xevent.Key) ? "Raised" : "NotRaised", time: inMessages.ContainsKey(xevent.Key)?inMessages[xevent.Key].MessageDateTime:DateTime.MinValue, sourceGuid: inMessages.ContainsKey(xevent.Key) ? inMessages[xevent.Key].Source.SourceId.ToString(): "", sourceName: inMessages.ContainsKey(xevent.Key) ? inMessages[xevent.Key].Source.SourceName:"", source: inMessages.ContainsKey(xevent.Key) ? inMessages[xevent.Key].Source.SourceType.Source_Type.GetFriendlyName(): "", expectedSource: xevent.ExpectedSourceType.Source_Type.GetFriendlyName(), message: "",// new JavaScriptSerializer().Serialize(inMessages[xevent.Key]), processInfo: new JavaScriptSerializer().Serialize(xevent.ProcessInfo))) .Cast <IComplexEventLog>() .ToList()); } catch (Exception) { throw; } }
public CreateProcessActor(IList <IComplexEventAction> complexEvents, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { ComplexEvents = complexEvents; }
public LoadEntityRange(int startIndex, int count, SortDescriptionCollection sortDescriptions, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { StartIndex = startIndex; Count = count; SortDescriptions = sortDescriptions; }
public EntityViewWithChangesFound(TView entity, Dictionary <string, dynamic> changes, IStateEventInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { Entity = entity; Changes = changes; }
public ExecuteComplexEventAction(IProcessAction action, IComplexEventParameters complexEventParameters, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { Action = action; ComplexEventParameters = complexEventParameters; }
public CreateEntity(T entity, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { Contract.Requires(entity != null); Entity = entity; }