/// <summary> /// Creates and configures a new working set object /// </summary> /// <param name="basePath">The base directory to store any data required by the working set. This is unused by this factory</param> /// <param name="dataArchive">The data archive that this working set is based on</param> /// <param name="taskFactory">The task factory to use for any working set tasks</param> /// <returns>A new working set</returns> public override AbstractWorkingSet CreateWorkingSet(string basePath, DataArchive dataArchive, TaskFactory taskFactory) { TWorkingSetFactory factory = new TWorkingSetFactory(); factory.Archive = dataArchive; factory.Factory = taskFactory; return(factory); }
/// <summary> /// Creates a new project object /// </summary> /// <param name="baseDirectory">The directory to store the data in</param> /// <param name="monitoredDirectory">The directory to monitor</param> /// <param name="srcMLBinaryDirectory">The directory with <c>src2srcml.exe</c></param> public DataProject(string baseDirectory, string monitoredDirectory, string srcMLBinaryDirectory) : base(baseDirectory, monitoredDirectory, srcMLBinaryDirectory) { Data = new DataArchive(baseDirectory, SourceArchive); SetupWorkingSet(); Data.Generator.IsLoggingErrors = true; Data.Generator.ErrorLog = SourceArchive.Generator.ErrorLog; }
/// <summary> /// Creates a new working set object /// </summary> /// <param name="archive">The archive to monitor</param> /// <param name="factory">The task factory</param> protected AbstractWorkingSet(DataArchive archive, TaskFactory factory) { Archive = archive; Factory = factory; IsDisposed = false; UseAsynchronousMethods = false; _globalScopeManager = new GlobalScopeManager(); _globalScopeLock = new ReaderWriterLockSlim(); }
/// <summary> /// Creates a new project object /// </summary> /// <param name="scheduler">The task scheduler</param> /// <param name="monitor">The file monitor</param> /// <param name="srcmlGenerator">The generator object for srcML</param> public DataProject(TaskScheduler scheduler, AbstractFileMonitor monitor, SrcMLGenerator srcmlGenerator) : base(scheduler, monitor, new SrcMLGenerator()) { var fileMapPath = Path.Combine(StoragePath, DataArchive.DEFAULT_ARCHIVE_DIRECTORY); Data = new DataArchive(StoragePath, DataArchive.DEFAULT_ARCHIVE_DIRECTORY, true, SourceArchive, new DataGenerator(), new DataFileNameMapping(fileMapPath), scheduler); SetupWorkingSet(); Data.Generator.IsLoggingErrors = true; Data.Generator.ErrorLog = SourceArchive.Generator.ErrorLog; }
/// <summary> /// Creates a new null working set object /// </summary> /// <param name="archive">The data archive</param> /// <param name="factory">The task factory</param> public NullWorkingSet(DataArchive archive, TaskFactory factory) : base(archive, factory) { }
/// <summary> /// Creates and configures a new working set object /// </summary> /// <param name="basePath">The base directory to store any data required by the working set</param> /// <param name="dataArchive">The data archive that this working set is based on</param> /// <param name="taskFactory">The task factory to use for any working set tasks</param> /// <returns>A new working set</returns> public abstract AbstractWorkingSet CreateWorkingSet(string basePath, DataArchive dataArchive, TaskFactory taskFactory);
/// <summary> /// Creates and configures a new working set object /// </summary> /// <param name="basePath">The base path to store any data required by the working set</param> /// <param name="dataArchive">The data archive that this working set is based on</param> /// <returns>A new working set</returns> public AbstractWorkingSet CreateWorkingSet(string basePath, DataArchive dataArchive) { return(CreateWorkingSet(basePath, dataArchive, Task.Factory)); }
/// <summary> /// Creates a new complete working set object /// </summary> /// <param name="archive">The data archive to monitor</param> /// <param name="factory">The task factory for asynchronous methods</param> public CompleteWorkingSet(DataArchive archive, TaskFactory factory) : base(archive, factory) { }
/// <summary> /// Creates a new complete working set object /// </summary> /// <param name="archive">The data archive to monitor</param> public CompleteWorkingSet(DataArchive archive) : this(archive, Task.Factory) { }