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); }
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; }
public AFMetaDataController() { _sessionContext = SessionContextProvider.GetSessionContext(); _piWebClient = new PIWebClient(_sessionContext.UserContext, null); }