Kooboo.Commerce.Rules.EventSlot.Initialize C# (CSharp) Méthode

Initialize() public méthode

public Initialize ( ) : void
Résultat void
        public void Initialize()
        {
            Event.Listen(EventType, Handle);
        }

Usage Example

Exemple #1
0
        public void Register(string group, Type eventType, string shortName = null)
        {
            var slot = new EventSlot(eventType, shortName);

            slot.Initialize();

            _slotsByEventNames.Add(eventType.Name, slot);

            if (!_slotsByGroups.ContainsKey(group))
            {
                _slotsByGroups.Add(group, new List <EventSlot> {
                    slot
                });
            }
            else
            {
                _slotsByGroups[group].Add(slot);
            }
        }