/// <summary> /// Creates a new Loader for the given top level folder /// </summary> public MyLoIndexer(IMyLoIndexer indexer) { _myLoStore = new MyLoDB(); _count = 0; _userId = 0; _indexer = indexer; }
/// <summary> /// Creates a new Loader for the given top level folder /// </summary> /// <param name="folderUri">Top Level Folder</param> public PhotoLoader() { var xmlElm = XElement.Load(@"../../../configuration.xml"); XElement element = xmlElm.Element("photoIndex"); _timeIndexKind = element.Value; _count = 0; _userId = 0; _myLoStore = new MyLoDB(); }
/// <summary> /// Saves in memory representation of Calendar context items to MyLo database /// </summary> public void SaveContextToDB(long userId) { _myloStore = new MyLoDB(); _userId = userId; if (_userId != 0) { try { AddEvents(); } catch (Exception ex) { throw new MyLoException("Save Context Error - Calendar Posts: Inner exception: " + ex); } } else { throw new MyLoException(String.Format("Invalid User Account {0}", _userId.ToString())); } }
/// <summary> /// Initializes a MyLo datastore indexer /// </summary> /// <param name="userId">A validated MyLo Account Id</param> /// <param name="conn">A validated MyLoDB connection</param> public void InitializeMyLoIndexer(long userId, NpgsqlConnection conn, MyLoDB store) { _conn = conn; _userId = userId; _store = store; }
/// <summary> /// Saves Graph containing Facebook context items to MyLo database /// </summary> public void SaveContextToDB(string myloUserName) { _myloStore = new MyLoDB(); _userId = _myloStore.GetUserAccount(myloUserName); if (_userId != 0) { try { AddFacebookPosts(); } catch (Exception ex) { throw new MyLoException("Save Context Error - Facebook Posts: Inner exception: " + ex); } try { AddFacebookCheckins(); } catch (Exception ex) { throw new MyLoException("Save Context Error - Facebook Checkins: Inner exception: " + ex); } try { AddFacebookPeople(); } catch (Exception ex) { throw new MyLoException("Save Context Error - Facebook Checkins: Inner exception: " + ex); } } else { throw new MyLoException(String.Format("Invalid User Account {0}", myloUserName)); } }
/// <summary> /// Creates a new Loader for the given top level folder /// </summary> public MyLoPhotoBrowser() { _userId = 0; _myLoStore = new MyLoDB(); }