summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-25 19:17:29 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-25 19:17:29 -0400
commite3b38a70f8d710af07732b325a6013ed18aa0fb0 (patch)
treeb579250f8dff5ba71cffc6d54ed85f4ffa15914e /src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs
parent5030e965dcfa4b8d9c6ed2285ceed5f7cdc472a9 (diff)
downloadSMAPI-e3b38a70f8d710af07732b325a6013ed18aa0fb0.tar.gz
SMAPI-e3b38a70f8d710af07732b325a6013ed18aa0fb0.tar.bz2
SMAPI-e3b38a70f8d710af07732b325a6013ed18aa0fb0.zip
reorganize new classes
Diffstat (limited to 'src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs')
-rw-r--r--src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs b/src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs
new file mode 100644
index 00000000..33e91db0
--- /dev/null
+++ b/src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs
@@ -0,0 +1,22 @@
+using System.IO;
+using Mono.Cecil;
+using Mono.Cecil.Cil;
+
+namespace StardewModdingAPI.Framework.ModLoading.Symbols
+{
+ internal class SymbolWriterProvider : ISymbolWriterProvider
+ {
+ private readonly ISymbolWriterProvider BaseProvider = new DefaultSymbolWriterProvider();
+
+ public ISymbolWriter GetSymbolWriter( ModuleDefinition module, string fileName )
+ {
+ return this.BaseProvider.GetSymbolWriter( module, fileName );
+ }
+
+ public ISymbolWriter GetSymbolWriter( ModuleDefinition module, Stream symbolStream )
+ {
+ // Not implemented in default native pdb writer, so fallback to portable
+ return new PortablePdbWriterProvider().GetSymbolWriter( module, symbolStream );
+ }
+ }
+}