using System; using System.Collections.Generic; using System.Linq.Expressions; using DelftTools.Utils.Data; namespace DelftTools.Shell.Core.Dao { public interface IProjectRepository : IObjectRepository, IDisposable { /// /// Path to the current repository. /// string Path { get; } /// /// Path to previous location of the repository or empty if there is none. /// TODO: To be removed /// string PreviousPath { get; } /// /// Object types that are not used in a project and that should be included during migration (like IGuiViewContext) /// List TypesToIncludeInMigration { get; set; } /// /// Returns true if repository is currently opened. /// bool IsOpen { get; } /// /// Opens repository using provided path. /// /// Path to project repository, usually file with .dsproj extension. Project Open(string path); /// /// Creates a new repository and establishes and opens it. /// /// void Create(string path); /// /// Closes repository file. /// void Close(); void SaveAs(Project project, string targetPath); /// /// Gets project object from the repository. Project repository always contains one Project. /// /// Project GetProject(); // TODO: move 2 methods below to IObjectRepository IEnumerable GetAllEntities(); void SaveOrUpdateEntity(T obj); void PreLoad(params Expression>[] collectionToPreload) where T : class; } }