Пример #1
0
 public override void Initialize()
 {
     Bus.Register <GeolocationDataHandler>();
     Bus.Register <MessagesDataHandler>();
     if (Savior.Has(_usersKey))
     {
         _users = Savior.Get <List <UserBase> >(_usersKey);
     }
     if (Savior.Has(_groupsKey))
     {
         _groups = Savior.Get <List <UserGroupBase> >(_groupsKey);
     }
 }
Пример #2
0
        public ScenariosManager()
        {
            if (!Singleton.Any <IGeolocationListener>())
            {
                var listener = new GeolocationListener();
                Singleton.Add(listener);
                listener.StartListenChanges();
            }

            if (!Bus.Any <GeolocationDataHandler>())
            {
                Bus.Register <GeolocationDataHandler>();
            }
            if (!Bus.Any <DeviceDataHandler>())
            {
                Bus.Register <DeviceDataHandler>();
            }
            if (!Bus.Any <MessagesDataHandler>())
            {
                Bus.Register <MessagesDataHandler>();
            }
        }