Exemple #1
0
        private ModelEventObservations GetEventRegistrations(object modelId)
        {
            ModelEventObservations eventObservations;

            lock (_gate)
            {
                if (!_modelRegistries.TryGetValue(modelId, out eventObservations))
                {
                    eventObservations = new ModelEventObservations();
                    _modelRegistries.Add(modelId, eventObservations);
                }
            }
            return(eventObservations);
        }
Exemple #2
0
        int IEventsObservationRegistrar.GetEventObservationCount(object modelId, Type eventType)
        {
            ModelEventObservations eventObservations = GetEventRegistrations(modelId);

            return(eventObservations.GetEventObservationCount(eventType));
        }
Exemple #3
0
        IList <EventObservations> IEventsObservationRegistrar.GetEventObservations(object modelId)
        {
            ModelEventObservations eventObservations = GetEventRegistrations(modelId);

            return(eventObservations.GetEventObservations());
        }
Exemple #4
0
        public void DecrementRegistration <TEvent>(object modelId)
        {
            ModelEventObservations eventObservations = GetEventRegistrations(modelId);

            eventObservations.DecrementRegistration <TEvent>();
        }