Skip to content
This repository has been archived by the owner on Sep 12, 2020. It is now read-only.

Commit

Permalink
Add Region Directive
Browse files Browse the repository at this point in the history
  • Loading branch information
moelrobi committed Aug 3, 2020
1 parent f01d027 commit bbde190
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions SynapseModLoaderPatcher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,13 @@ public static void Main(string[] args)
Console.WriteLine("Synapse-Public: Creating Publicized DLL");

var allTypes = GetAllTypes(publicModule.Assembly.ManifestModule);
var allMethods = allTypes.SelectMany(t => t.Methods);
var allFields = allTypes.SelectMany(t => t.Fields);
var typeDefs = allTypes.ToList();
var allMethods = typeDefs.SelectMany(t => t.Methods);
var allFields = typeDefs.SelectMany(t => t.Fields);

foreach (var type in allTypes)
#region Publiczing

foreach (var type in typeDefs)
{
if (!type?.IsPublic ?? false)
{
Expand All @@ -142,7 +145,9 @@ public static void Main(string[] args)
field.Access = FieldAttributes.Public;
}
}


#endregion

publicModule.Write("Assembly-CSharp-Synapse_publicised.dll");

Console.WriteLine("Synapse-Public: Created Publicised DLL");
Expand Down

0 comments on commit bbde190

Please sign in to comment.