reorganize new classes

This commit is contained in:
Jesse Plamondon-Willard 2021-08-25 19:17:29 -04:00
parent 5030e965dc
commit e3b38a70f8
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
4 changed files with 9 additions and 17 deletions

View File

@ -7,6 +7,7 @@ using Mono.Cecil;
using Mono.Cecil.Cil; using Mono.Cecil.Cil;
using StardewModdingAPI.Framework.Exceptions; using StardewModdingAPI.Framework.Exceptions;
using StardewModdingAPI.Framework.ModLoading.Framework; using StardewModdingAPI.Framework.ModLoading.Framework;
using StardewModdingAPI.Framework.ModLoading.Symbols;
using StardewModdingAPI.Metadata; using StardewModdingAPI.Metadata;
using StardewModdingAPI.Toolkit.Framework.ModData; using StardewModdingAPI.Toolkit.Framework.ModData;
using StardewModdingAPI.Toolkit.Utilities; using StardewModdingAPI.Toolkit.Utilities;

View File

@ -1,22 +1,18 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Mono.Cecil; using Mono.Cecil;
using Mono.Cecil.Cil; using Mono.Cecil.Cil;
using Mono.Cecil.Pdb; using Mono.Cecil.Pdb;
namespace StardewModdingAPI.Framework.ModLoading namespace StardewModdingAPI.Framework.ModLoading.Symbols
{ {
internal class MySymbolReader : ISymbolReader internal class SymbolReader : ISymbolReader
{ {
private ModuleDefinition Module; private ModuleDefinition Module;
private Stream Stream; private Stream Stream;
private ISymbolReader Using; private ISymbolReader Using;
public MySymbolReader( ModuleDefinition module, Stream stream ) public SymbolReader( ModuleDefinition module, Stream stream )
{ {
this.Module = module; this.Module = module;
this.Stream = stream; this.Stream = stream;
@ -49,7 +45,7 @@ namespace StardewModdingAPI.Framework.ModLoading
public MethodDebugInformation Read( MethodDefinition method ) public MethodDebugInformation Read( MethodDefinition method )
{ {
return Using.Read( method ); return this.Using.Read( method );
} }
} }
} }

View File

@ -1,11 +1,9 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using Mono.Cecil; using Mono.Cecil;
using Mono.Cecil.Cil; using Mono.Cecil.Cil;
using Mono.Cecil.Pdb;
namespace StardewModdingAPI.Framework.ModLoading namespace StardewModdingAPI.Framework.ModLoading.Symbols
{ {
internal class SymbolReaderProvider : ISymbolReaderProvider internal class SymbolReaderProvider : ISymbolReaderProvider
{ {
@ -21,7 +19,7 @@ namespace StardewModdingAPI.Framework.ModLoading
public ISymbolReader GetSymbolReader( ModuleDefinition module, string fileName ) public ISymbolReader GetSymbolReader( ModuleDefinition module, string fileName )
{ {
if ( this.SymbolMapping.ContainsKey( module.Name ) ) if ( this.SymbolMapping.ContainsKey( module.Name ) )
return new MySymbolReader( module, this.SymbolMapping[ module.Name ] ); return new SymbolReader( module, this.SymbolMapping[ module.Name ] );
return this.BaseProvider.GetSymbolReader( module, fileName ); return this.BaseProvider.GetSymbolReader( module, fileName );
} }
@ -29,7 +27,7 @@ namespace StardewModdingAPI.Framework.ModLoading
public ISymbolReader GetSymbolReader( ModuleDefinition module, Stream symbolStream ) public ISymbolReader GetSymbolReader( ModuleDefinition module, Stream symbolStream )
{ {
if ( this.SymbolMapping.ContainsKey( module.Name ) ) if ( this.SymbolMapping.ContainsKey( module.Name ) )
return new MySymbolReader( module, this.SymbolMapping[ module.Name ] ); return new SymbolReader( module, this.SymbolMapping[ module.Name ] );
return this.BaseProvider.GetSymbolReader( module, symbolStream ); return this.BaseProvider.GetSymbolReader( module, symbolStream );
} }

View File

@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using Mono.Cecil; using Mono.Cecil;
using Mono.Cecil.Cil; using Mono.Cecil.Cil;
using Mono.Cecil.Pdb;
namespace StardewModdingAPI.Framework.ModLoading namespace StardewModdingAPI.Framework.ModLoading.Symbols
{ {
internal class SymbolWriterProvider : ISymbolWriterProvider internal class SymbolWriterProvider : ISymbolWriterProvider
{ {