Skip to content

Commit 0534f4d

Browse files
committed
fix initialization
1 parent 8925e43 commit 0534f4d

5 files changed

Lines changed: 10 additions & 12 deletions

File tree

Analyzer/AnalyzerTool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public int Analyze(
109109
parser.Dispose();
110110
}
111111

112-
timer.Stop();
112+
timer.Stop();
113113
Console.WriteLine();
114114
Console.WriteLine($"Total time: {(timer.Elapsed.TotalMilliseconds / 1000.0):F3} s");
115115

Analyzer/SQLite/Commands/AbstractCommand.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using Microsoft.Data.Sqlite;
22
using System;
33
using System.Collections.Generic;
4-
using System.Linq;
54
using System.Text;
6-
using System.Threading.Tasks;
75

86
namespace Analyzer.SQLite.Commands
97
{
@@ -30,7 +28,6 @@ public void RunDDL(SqliteConnection database)
3028

3129
public void CreateCommand(SqliteConnection database)
3230
{
33-
// TODO: Maybe make this explicit?
3431
RunDDL(database);
3532

3633
m_Command = database.CreateCommand();

Analyzer/SQLite/Commands/SerializedFile/AddAssetDependency.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal class AddAssetDependency : AbstractCommand
1616
{
1717
protected override string TableName => "asset_dependencies";
1818

19-
protected override string DDLSource => null;
19+
protected override string DDLSource => Resources.AssetBundle;
2020

2121
protected override Dictionary<string, SqliteType> Fields => new()
2222
{

Analyzer/SQLite/Parsers/AddressablesBuildLayoutParser.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ namespace Analyzer.SQLite.Parsers
1717
{
1818
public class AddressablesBuildLayoutParser : ISQLiteFileParser
1919
{
20-
private AddressablesBuildLayoutSQLWriter writer;
20+
private AddressablesBuildLayoutSQLWriter m_Writer;
2121

2222
public bool Verbose { get; set; }
2323
public bool SkipReferences { get; set; }
2424

2525
public void Dispose()
2626
{
27-
throw new NotImplementedException();
27+
m_Writer.Dispose();
2828
}
2929
public void Init(SqliteConnection db)
3030
{
31-
writer = new AddressablesBuildLayoutSQLWriter(db);
32-
writer.Init();
31+
m_Writer = new AddressablesBuildLayoutSQLWriter(db);
32+
m_Writer.Init();
3333
}
3434

3535
public bool CanParse(string filename)
@@ -83,7 +83,7 @@ public void Parse(string filename)
8383
{
8484
JsonSerializer serializer = new JsonSerializer();
8585
BuildLayout buildLayout = (BuildLayout)serializer.Deserialize(reader, typeof(BuildLayout));
86-
writer.WriteAddressablesBuild(filename, buildLayout);
86+
m_Writer.WriteAddressablesBuild(filename, buildLayout);
8787
}
8888
}
8989
}

Analyzer/SQLite/Parsers/SerializedFileParser.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public bool CanParse(string filename)
2222
{
2323
return ShouldIgnoreFile(filename) == false;
2424
}
25-
25+
2626

2727
public void Dispose()
2828
{
@@ -31,7 +31,8 @@ public void Dispose()
3131

3232
public void Init(SqliteConnection db)
3333
{
34-
m_Writer = new AssetBundleSQLiteWriter(db, Verbose);
34+
m_Writer = new AssetBundleSQLiteWriter(db, SkipReferences);
35+
m_Writer.Init();
3536
}
3637

3738
public void Parse(string filename)

0 commit comments

Comments
 (0)