public void ProcessOpList(OpList list)
        {
            Activated   = ImmutableHashSet <EntityId> .Empty;
            Deactivated = ImmutableHashSet <EntityId> .Empty;

            foreach (var op in list.OfOpType <AddComponentOp>())
            {
                Added(op);
            }

            foreach (var op in list.OfOpType <RemoveComponentOp>())
            {
                Removed(op);
            }
        }
Пример #2
0
 private static void ProcessOpList(OpList opList)
 {
     foreach (var disconnectOp in opList.OfOpType <DisconnectOp>())
     {
         Log.Information(disconnectOp.Reason);
     }
 }
        public static bool TryGetWorkerFlagChange(this OpList opList, string flagName, out string newValue)
        {
            newValue = string.Empty;
            var found = false;

            foreach (var op in opList.OfOpType <FlagUpdateOp>().Where(op => op.Name == flagName))
            {
                newValue = op.Value;
                // Don't break early,  ensure that the last received flag update is the one that's applied.
                found = true;
            }

            return(found);
        }
Пример #4
0
        public void ProcessOpList(OpList opList)
        {
            foreach (var op in opList.OfOpType <ComponentUpdateOp>().OfComponent(componentId))
            {
                if (!op.Update.SchemaData.HasValue || !getEvents(op.Update.SchemaData.Value, out var newEvents))
                {
                    continue;
                }

                foreach (var evt in newEvents)
                {
                    eventBuffer.Enqueue(evt);
                }
            }
        }