Пример #1
0
        public PhoneDataController()
        {
            _sessionCtx = SessionContextProvider.GetSessionContext();
            _dataProcessor = new DataProcessor(_sessionCtx.DataContext);

            _piWebClients = _dataProcessor.Consumers.Select(consumer => new PIWebClient(_sessionCtx.UserContext, consumer)).ToList();

            
            _efClient = new PIWebClient(_sessionCtx.UserContext, null);
        }
Пример #2
0
        public static SessionContext GetSessionContext()
        {
            UserSettings userSettings = UserSettings.GetStoredUserSettings();
            DataSettings dataSettings = DataSettings.GetStoredDataSettings();

            UserContext userContext = new UserContext
            {
                Username = userSettings.Username,
                Password = userSettings.Password,
                WebIDs = userSettings.WebIDs
            };

            DataContext dataContext = new DataContext
            {
                PhoneAccelerometerEnabled = dataSettings.PhoneSettings.AccelerometerEnabled,
                PhoneGeopositionEnabled = dataSettings.PhoneSettings.GeopositionEnabled
            };

            SessionContext sessionContext = new SessionContext { UserContext = userContext, DataContext = dataContext };
            return sessionContext;
        }
Пример #3
0
 public AFMetaDataController()
 {
     _sessionContext = SessionContextProvider.GetSessionContext();
     _piWebClient = new PIWebClient(_sessionContext.UserContext, null);
 }