public static void Publish(IPublisher <ICommand> publisher) { for (int i = 0; i < 10_000; i++) { var cmd = new AtomEvent(new AtomTracker.AtomTrackerId(i.ToString(), "elders")); publisher.Publish(cmd); } }
/// <summary> /// Converts a WinQual Atom Event into a StackHashEvent. /// </summary> /// <param name="thisEvent">WinQual event to convert.</param> /// <returns>Converted event.</returns> public static StackHashEvent ConvertEvent(AtomEvent thisEvent) { if (thisEvent == null) { throw new ArgumentNullException("thisEvent"); } return(thisEvent.Event); }
public static StackHashCabCollection GetCabInfoAtom(AtomFeed feed, AtomEvent theEvent) { // Get the list of events. AtomCabCollection atomCabs = feed.GetCabs(theEvent); // Convert to a StackHashCabCollection. StackHashCabCollection atomStackHashCabss = new StackHashCabCollection(); foreach (AtomCab atomCab in atomCabs) { atomStackHashCabss.Add(atomCab.Cab); } return(atomStackHashCabss); }
public static StackHashEventInfoCollection GetEventInfoAtom(AtomFeed feed, AtomEvent theEvent, int days) { // Get the list of events. AtomEventInfoCollection atomEventInfos = feed.GetEventDetails(theEvent, days); // Convert to a StackHashEventInfoCollection. StackHashEventInfoCollection atomStackHashEventInfos = new StackHashEventInfoCollection(); foreach (AtomEventInfo atomEventInfo in atomEventInfos) { atomStackHashEventInfos.Add(atomEventInfo.EventInfo); } return(atomStackHashEventInfos); }
public void CreateAnimationUnit(string name, AnimatorControllerParameterType type, BoolVariable boolVariable = null, IntVariable intVariable = null, FloatVariable floatVariable = null, AtomEvent atomEvent = null) { AnimationUnit unit = ScriptableObject.CreateInstance <AnimationUnit>(); unit.name = name; if (boolVariable != null) { unit.boolVariable = boolVariable; BoolEvent boolEvent = ScriptableObject.CreateInstance <BoolEvent>(); boolVariable.Changed = boolEvent; } else if (intVariable != null) { unit.intVariable = intVariable; IntEvent intEvent = ScriptableObject.CreateInstance <IntEvent>(); intVariable.Changed = intEvent; } else if (floatVariable != null) { unit.floatVariable = floatVariable; FloatEvent floatEvent = ScriptableObject.CreateInstance <FloatEvent>(); floatVariable.Changed = floatEvent; } else if (atomEvent != null) { unit.atomEvent = atomEvent; } AddToAnimationUnits(unit); SetUpAnimationUnit(unit); }
public async Task HandleAsync(AtomEvent command) { AtomTracker ar = new AtomTracker(command.Id); await repository.SaveAsync(ar).ConfigureAwait(false); }