/// <summary> /// Method which will be executed when Open menu command is exectued. /// </summary> /// <typeparam name="T">Type of object which will be loaded to application.</typeparam> /// <param name="filePath">Path of the file.</param> /// <returns>Object returned from load process.</returns> public T Open <T>( string filePath) { UserDataPersistManager userDataPersistManager = new UserDataPersistManager(); return(userDataPersistManager.Load <T>(filePath)); }
/// <summary> /// Method which will be executed when Save menu command is exectued. /// </summary> /// <typeparam name="T">Type of the object which will be persisted.</typeparam> /// <param name="obj">The object which will be persisted.</param> /// <param name="filePath">Path of the file.</param> public void Save <T>( T obj, string filePath) { UserDataPersistManager userDataPersistManager = new UserDataPersistManager(); userDataPersistManager.Save <T>(obj, filePath); }