mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(FormatCatalog.DataDirectory): new property.
This commit is contained in:
@@ -70,11 +70,15 @@ namespace GameRes
|
||||
|
||||
public int CurrentSchemeVersion { get; private set; }
|
||||
public string SchemeID { get { return "GARbroDB"; } }
|
||||
public string AssemblyLocation { get { return m_gameres_dir.Value; } }
|
||||
public string DataDirectory { get { return AssemblyLocation; } }
|
||||
|
||||
public Exception LastError { get; set; }
|
||||
|
||||
public event ParametersRequestEventHandler ParametersRequest;
|
||||
|
||||
private Lazy<string> m_gameres_dir = new Lazy<string> (() => Path.GetDirectoryName (System.Reflection.Assembly.GetExecutingAssembly().Location));
|
||||
|
||||
private FormatCatalog ()
|
||||
{
|
||||
//An aggregate catalog that combines multiple catalogs
|
||||
@@ -82,7 +86,7 @@ namespace GameRes
|
||||
//Adds all the parts found in the same assembly as the Program class
|
||||
catalog.Catalogs.Add (new AssemblyCatalog (typeof(FormatCatalog).Assembly));
|
||||
//Adds parts matching pattern found in the directory of the assembly
|
||||
catalog.Catalogs.Add (new DirectoryCatalog (Path.GetDirectoryName (System.Reflection.Assembly.GetExecutingAssembly().Location), "Arc*.dll"));
|
||||
catalog.Catalogs.Add (new DirectoryCatalog (AssemblyLocation, "Arc*.dll"));
|
||||
|
||||
//Create the CompositionContainer with the parts in the catalog
|
||||
using (var container = new CompositionContainer (catalog))
|
||||
|
||||
Reference in New Issue
Block a user