public static SynchedDB GetInstance() { if (DBUniqueInstance == null) { DBUniqueInstance = new SynchedDB(); } return(DBUniqueInstance); }
private SynchedModel(FlowDocument fdDoc, String strUser) { ModelDB = SynchedDB.GetInstance(); Doc = fdDoc; // Get a user object for the current user currentUser = ModelDB.GetUserByKey(strUser); if (currentUser == null) { throw new Exception("No user found for user key " + strUser); } // Create an object for the current document SDCurrentDoc = new SynchedDocument { Id = 1, Owner = currentUser }; // FIXME Document ID is hardcoded }