Browse Source

Added most of the Net3 proxy

pull/32/head
Anairkoen Schno 5 years ago
parent
commit
b7fac8944d
25 changed files with 699 additions and 40 deletions
  1. +3
    -3
      BSIPA-Meta/BSIPA-Meta.csproj
  2. +181
    -31
      BSIPA.sln
  3. +7
    -0
      IPA.Injector/IPA.Injector.csproj
  4. +4
    -0
      IPA.Loader/Config/Config.cs
  5. +6
    -0
      IPA.Loader/Config/ConfigProviders/JsonConfigProvider.cs
  6. +4
    -2
      IPA.Loader/Config/IConfigProvider.cs
  7. +3
    -0
      IPA.Loader/Config/ModPrefs.cs
  8. +9
    -0
      IPA.Loader/IPA.Loader.csproj
  9. +3
    -0
      IPA.Loader/Loader/Features/Feature.cs
  10. +3
    -0
      IPA.Loader/Loader/PluginInitInjector.cs
  11. +6
    -1
      IPA.Loader/Loader/PluginLoader.cs
  12. +5
    -0
      IPA.Loader/Loader/PluginManager.cs
  13. +4
    -0
      IPA.Loader/Logging/Printers/GZFilePrinter.cs
  14. +3
    -0
      IPA.Loader/Logging/Printers/PluginSubLogPrinter.cs
  15. +2
    -2
      IPA.Loader/Logging/StdoutInterceptor.cs
  16. +3
    -1
      IPA.Loader/Utilities/BeatSaber.cs
  17. +3
    -0
      IPA.Loader/Utilities/Utils.cs
  18. +167
    -0
      Net3-Proxy/Extensions.cs
  19. +27
    -0
      Net3-Proxy/File.cs
  20. +29
    -0
      Net3-Proxy/IReadOnlyList.cs
  21. +56
    -0
      Net3-Proxy/Net3-Proxy.csproj
  22. +56
    -0
      Net3-Proxy/Path.cs
  23. +36
    -0
      Net3-Proxy/Properties/AssemblyInfo.cs
  24. +53
    -0
      Net3-Proxy/Tuple.cs
  25. +26
    -0
      Net3-Proxy/Utils.cs

+ 3
- 3
BSIPA-Meta/BSIPA-Meta.csproj View File

@ -20,10 +20,10 @@
<ProxyPlatform>x64</ProxyPlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x86-Net4' Or '$(Platform)' == 'x64-Net4' ">
<NetPlatform>4</NetPlatform>
<NetPlatform>Net4</NetPlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x86-Net3' Or '$(Platform)' == 'x64-Net3' ">
<NetPlatform>3</NetPlatform>
<NetPlatform>Net3</NetPlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -85,7 +85,7 @@
<Message Text="Results will be put in $(OutputPath)" Importance="High" />
<ItemGroup>
<InputDlls Include="$(SolutionDir)IPA.Injector\bin\Net$(NetPlatform)\$(OtherConfig)\**\*" Exclude="$(SolutionDir)IPA.Injector\bin\Net$(NetPlatform)\$(OtherConfig)\Libraries\**\*" />
<InputDlls Include="$(SolutionDir)IPA.Injector\bin\$(NetPlatform)\$(OtherConfig)\**\*" Exclude="$(SolutionDir)IPA.Injector\bin\$(NetPlatform)\$(OtherConfig)\Libraries\**\*" />
<InputDlls Include="$(SolutionDir)Doorstop\Proxy\bin\$(ProxyPlatform)\$(ProxyConfig)\**\*.dll" />
<InputDlls Include="$(SolutionDir)Doorstop\Proxy\bin\$(ProxyPlatform)\$(ProxyConfig)\**\*.pdb" />
<InputIPAFiles Include="$(SolutionDir)IPA\bin\$(OtherConfig)\**\*" />


+ 181
- 31
BSIPA.sln View File

@ -49,138 +49,288 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BSIPA-Meta", "BSIPA-Meta\BS
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7} = {2A1AF16B-27F1-46E0-9A95-181516BC1CB7}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Net3-Proxy", "Net3-Proxy\Net3-Proxy.csproj", "{642F52DA-90F9-40E3-8784-6964F36752FB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64-Net3 = Debug|x64-Net3
Debug|x64-Net4 = Debug|x64-Net4
Debug|x86-Net3 = Debug|x86-Net3
Debug|x86-Net4 = Debug|x86-Net4
Release|x64-Net3 = Release|x64-Net3
Release|x64-Net4 = Release|x64-Net4
Release|x86-Net3 = Release|x86-Net3
Release|x86-Net4 = Release|x86-Net4
Verbose|x64-Net4 = Verbose|x64-Net4
Verbose|x86-Net4 = Verbose|x86-Net4
Verbose_Release|x64-Net3 = Verbose_Release|x64-Net3
Verbose_Release|x64-Net4 = Verbose_Release|x64-Net4
Verbose_Release|x86-Net3 = Verbose_Release|x86-Net3
Verbose_Release|x86-Net4 = Verbose_Release|x86-Net4
Verbose|x64-Net3 = Verbose|x64-Net3
Verbose|x64-Net4 = Verbose|x64-Net4
Verbose|x86-Net3 = Verbose|x86-Net3
Verbose|x86-Net4 = Verbose|x86-Net4
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{14092533-98BB-40A4-9AFC-27BB75672A70}.Debug|x64-Net3.ActiveCfg = Debug|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Debug|x64-Net3.Build.0 = Debug|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Debug|x64-Net4.ActiveCfg = Debug|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Debug|x64-Net4.Build.0 = Debug|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Debug|x86-Net3.ActiveCfg = Debug|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Debug|x86-Net3.Build.0 = Debug|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Debug|x86-Net4.ActiveCfg = Debug|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Debug|x86-Net4.Build.0 = Debug|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Release|x64-Net3.ActiveCfg = Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Release|x64-Net3.Build.0 = Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Release|x64-Net4.ActiveCfg = Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Release|x64-Net4.Build.0 = Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Release|x86-Net3.ActiveCfg = Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Release|x86-Net3.Build.0 = Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Release|x86-Net4.ActiveCfg = Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Release|x86-Net4.Build.0 = Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x64-Net4.ActiveCfg = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x64-Net4.Build.0 = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x86-Net4.ActiveCfg = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x86-Net4.Build.0 = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose_Release|x64-Net3.ActiveCfg = Verbose_Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose_Release|x64-Net3.Build.0 = Verbose_Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose_Release|x64-Net4.ActiveCfg = Verbose_Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose_Release|x64-Net4.Build.0 = Verbose_Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose_Release|x86-Net3.ActiveCfg = Verbose_Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose_Release|x86-Net3.Build.0 = Verbose_Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose_Release|x86-Net4.ActiveCfg = Verbose_Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose_Release|x86-Net4.Build.0 = Verbose_Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x64-Net3.ActiveCfg = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x64-Net3.Build.0 = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x64-Net4.ActiveCfg = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x64-Net4.Build.0 = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x86-Net3.ActiveCfg = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x86-Net3.Build.0 = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x86-Net4.ActiveCfg = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x86-Net4.Build.0 = Verbose|Any CPU
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|x64-Net3.ActiveCfg = Debug|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|x64-Net3.Build.0 = Debug|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|x64-Net4.ActiveCfg = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|x64-Net4.Build.0 = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|x86-Net3.ActiveCfg = Debug|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|x86-Net3.Build.0 = Debug|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|x86-Net4.ActiveCfg = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|x86-Net4.Build.0 = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Release|x64-Net3.ActiveCfg = Release|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Release|x64-Net3.Build.0 = Release|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Release|x64-Net4.ActiveCfg = Release|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Release|x64-Net4.Build.0 = Release|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Release|x86-Net3.ActiveCfg = Release|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Release|x86-Net3.Build.0 = Release|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Release|x86-Net4.ActiveCfg = Release|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Release|x86-Net4.Build.0 = Release|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x64-Net4.ActiveCfg = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x64-Net4.Build.0 = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x86-Net4.ActiveCfg = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x86-Net4.Build.0 = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose_Release|x64-Net3.ActiveCfg = Release|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose_Release|x64-Net3.Build.0 = Release|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose_Release|x64-Net4.ActiveCfg = Release|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose_Release|x64-Net4.Build.0 = Release|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose_Release|x86-Net3.ActiveCfg = Release|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose_Release|x86-Net3.Build.0 = Release|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose_Release|x86-Net4.ActiveCfg = Release|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose_Release|x86-Net4.Build.0 = Release|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x64-Net3.ActiveCfg = Debug|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x64-Net3.Build.0 = Debug|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x64-Net4.ActiveCfg = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x64-Net4.Build.0 = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x86-Net3.ActiveCfg = Debug|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x86-Net3.Build.0 = Debug|Net3
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x86-Net4.ActiveCfg = Debug|Net4
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Verbose|x86-Net4.Build.0 = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Debug|x64-Net3.ActiveCfg = Debug|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Debug|x64-Net3.Build.0 = Debug|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Debug|x64-Net4.ActiveCfg = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Debug|x64-Net4.Build.0 = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Debug|x86-Net3.ActiveCfg = Debug|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Debug|x86-Net3.Build.0 = Debug|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Debug|x86-Net4.ActiveCfg = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Debug|x86-Net4.Build.0 = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Release|x64-Net3.ActiveCfg = Release|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Release|x64-Net3.Build.0 = Release|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Release|x64-Net4.ActiveCfg = Release|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Release|x64-Net4.Build.0 = Release|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Release|x86-Net3.ActiveCfg = Release|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Release|x86-Net3.Build.0 = Release|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Release|x86-Net4.ActiveCfg = Release|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Release|x86-Net4.Build.0 = Release|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x64-Net4.ActiveCfg = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x64-Net4.Build.0 = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x86-Net4.ActiveCfg = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x86-Net4.Build.0 = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose_Release|x64-Net3.ActiveCfg = Release|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose_Release|x64-Net3.Build.0 = Release|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose_Release|x64-Net4.ActiveCfg = Release|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose_Release|x64-Net4.Build.0 = Release|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose_Release|x86-Net3.ActiveCfg = Release|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose_Release|x86-Net3.Build.0 = Release|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose_Release|x86-Net4.ActiveCfg = Release|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose_Release|x86-Net4.Build.0 = Release|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x64-Net3.ActiveCfg = Debug|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x64-Net3.Build.0 = Debug|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x64-Net4.ActiveCfg = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x64-Net4.Build.0 = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x86-Net3.ActiveCfg = Debug|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x86-Net3.Build.0 = Debug|Net3
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x86-Net4.ActiveCfg = Debug|Net4
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}.Verbose|x86-Net4.Build.0 = Debug|Net4
{88609E16-731F-46C9-8139-6B1A7A83240D}.Debug|x64-Net3.ActiveCfg = Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Debug|x64-Net3.Build.0 = Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Debug|x64-Net4.ActiveCfg = Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Debug|x64-Net4.Build.0 = Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Debug|x86-Net3.ActiveCfg = Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Debug|x86-Net3.Build.0 = Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Debug|x86-Net4.ActiveCfg = Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Debug|x86-Net4.Build.0 = Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Release|x64-Net3.ActiveCfg = Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Release|x64-Net3.Build.0 = Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Release|x64-Net4.ActiveCfg = Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Release|x64-Net4.Build.0 = Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Release|x86-Net3.ActiveCfg = Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Release|x86-Net3.Build.0 = Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Release|x86-Net4.ActiveCfg = Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Release|x86-Net4.Build.0 = Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x64-Net4.ActiveCfg = Verbose_Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x64-Net4.Build.0 = Verbose_Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x86-Net4.ActiveCfg = Verbose_Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x86-Net4.Build.0 = Verbose_Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose_Release|x64-Net3.ActiveCfg = Verbose_Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose_Release|x64-Net3.Build.0 = Verbose_Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose_Release|x64-Net4.ActiveCfg = Verbose_Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose_Release|x64-Net4.Build.0 = Verbose_Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose_Release|x86-Net3.ActiveCfg = Verbose_Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose_Release|x86-Net3.Build.0 = Verbose_Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose_Release|x86-Net4.ActiveCfg = Verbose_Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose_Release|x86-Net4.Build.0 = Verbose_Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x64-Net3.ActiveCfg = Verbose_Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x64-Net3.Build.0 = Verbose_Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x64-Net4.ActiveCfg = Verbose_Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x64-Net4.Build.0 = Verbose_Release|x64
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x86-Net3.ActiveCfg = Verbose_Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x86-Net3.Build.0 = Verbose_Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x86-Net4.ActiveCfg = Verbose_Release|Win32
{88609E16-731F-46C9-8139-6B1A7A83240D}.Verbose|x86-Net4.Build.0 = Verbose_Release|Win32
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Debug|x64-Net3.ActiveCfg = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Debug|x64-Net3.Build.0 = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Debug|x64-Net4.ActiveCfg = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Debug|x64-Net4.Build.0 = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Debug|x86-Net3.ActiveCfg = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Debug|x86-Net3.Build.0 = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Debug|x86-Net4.ActiveCfg = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Debug|x86-Net4.Build.0 = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Release|x64-Net3.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Release|x64-Net4.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Release|x86-Net3.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Release|x86-Net4.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|x64-Net3.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|x64-Net4.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|x86-Net3.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|x86-Net4.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x64-Net3.ActiveCfg = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x64-Net3.Build.0 = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x64-Net4.ActiveCfg = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x64-Net4.Build.0 = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x86-Net3.ActiveCfg = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x86-Net3.Build.0 = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x86-Net4.ActiveCfg = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x86-Net4.Build.0 = Debug|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|x64-Net4.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|x86-Net4.ActiveCfg = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x64-Net3.ActiveCfg = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x64-Net3.Build.0 = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x64-Net4.ActiveCfg = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x64-Net4.Build.0 = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x86-Net3.ActiveCfg = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x86-Net3.Build.0 = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x86-Net4.ActiveCfg = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x86-Net4.Build.0 = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x64-Net3.ActiveCfg = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x64-Net3.Build.0 = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x64-Net4.ActiveCfg = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x64-Net4.Build.0 = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x86-Net3.ActiveCfg = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x86-Net3.Build.0 = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x86-Net4.ActiveCfg = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x86-Net4.Build.0 = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x64-Net4.ActiveCfg = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x64-Net4.Build.0 = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x86-Net4.ActiveCfg = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x86-Net4.Build.0 = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x64-Net3.ActiveCfg = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x64-Net3.Build.0 = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x64-Net4.ActiveCfg = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x64-Net4.Build.0 = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x86-Net3.ActiveCfg = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x86-Net3.Build.0 = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x86-Net4.ActiveCfg = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x86-Net4.Build.0 = Release|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x64-Net3.ActiveCfg = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x64-Net3.Build.0 = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x64-Net4.ActiveCfg = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x64-Net4.Build.0 = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x86-Net3.ActiveCfg = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x86-Net3.Build.0 = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x86-Net4.ActiveCfg = Debug|Any CPU
{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x86-Net4.Build.0 = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Debug|x64-Net3.ActiveCfg = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Debug|x64-Net4.ActiveCfg = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Debug|x64-Net4.Build.0 = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Debug|x86-Net3.ActiveCfg = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Debug|x86-Net4.ActiveCfg = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Release|x64-Net3.ActiveCfg = Release|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Release|x64-Net4.ActiveCfg = Release|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Release|x64-Net4.Build.0 = Release|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Release|x86-Net3.ActiveCfg = Release|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Release|x86-Net4.ActiveCfg = Release|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose|x64-Net4.ActiveCfg = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose|x64-Net4.Build.0 = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose|x86-Net4.ActiveCfg = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose_Release|x64-Net3.ActiveCfg = Release|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose_Release|x64-Net4.ActiveCfg = Release|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose_Release|x64-Net4.Build.0 = Release|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose_Release|x86-Net3.ActiveCfg = Release|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose_Release|x86-Net4.ActiveCfg = Release|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose|x64-Net3.ActiveCfg = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose|x64-Net4.ActiveCfg = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose|x64-Net4.Build.0 = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose|x86-Net3.ActiveCfg = Debug|Any CPU
{23AB2621-A05C-4377-8418-85E6012C0BBE}.Verbose|x86-Net4.ActiveCfg = Debug|Any CPU
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Debug|x64-Net3.ActiveCfg = Debug|x64-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Debug|x64-Net3.Build.0 = Debug|x64-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Debug|x64-Net4.ActiveCfg = Debug|x64-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Debug|x64-Net4.Build.0 = Debug|x64-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Debug|x86-Net3.ActiveCfg = Debug|x86-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Debug|x86-Net3.Build.0 = Debug|x86-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Debug|x86-Net4.ActiveCfg = Debug|x86-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Debug|x86-Net4.Build.0 = Debug|x86-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Release|x64-Net3.ActiveCfg = Release|x64-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Release|x64-Net3.Build.0 = Release|x64-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Release|x64-Net4.ActiveCfg = Release|x64-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Release|x64-Net4.Build.0 = Release|x64-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Release|x86-Net3.ActiveCfg = Release|x86-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Release|x86-Net3.Build.0 = Release|x86-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Release|x86-Net4.ActiveCfg = Release|x86-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Release|x86-Net4.Build.0 = Release|x86-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x64-Net4.ActiveCfg = Verbose|x64-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x64-Net4.Build.0 = Verbose|x64-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x86-Net4.ActiveCfg = Verbose|x86-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x86-Net4.Build.0 = Verbose|x86-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose_Release|x64-Net3.ActiveCfg = Verbose_Release|x64-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose_Release|x64-Net3.Build.0 = Verbose_Release|x64-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose_Release|x64-Net4.ActiveCfg = Verbose_Release|x64-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose_Release|x64-Net4.Build.0 = Verbose_Release|x64-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose_Release|x86-Net3.ActiveCfg = Verbose_Release|x86-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose_Release|x86-Net3.Build.0 = Verbose_Release|x86-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose_Release|x86-Net4.ActiveCfg = Verbose_Release|x86-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose_Release|x86-Net4.Build.0 = Verbose_Release|x86-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x64-Net3.ActiveCfg = Verbose|x64-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x64-Net3.Build.0 = Verbose|x64-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x64-Net4.ActiveCfg = Verbose|x64-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x64-Net4.Build.0 = Verbose|x64-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x86-Net3.ActiveCfg = Verbose|x86-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x86-Net3.Build.0 = Verbose|x86-Net3
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x86-Net4.ActiveCfg = Verbose|x86-Net4
{880A3560-82CD-4836-996B-11BEFE6B44DB}.Verbose|x86-Net4.Build.0 = Verbose|x86-Net4
{642F52DA-90F9-40E3-8784-6964F36752FB}.Debug|x64-Net3.ActiveCfg = Debug|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Debug|x64-Net3.Build.0 = Debug|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Debug|x64-Net4.ActiveCfg = Debug|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Debug|x86-Net3.ActiveCfg = Debug|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Debug|x86-Net3.Build.0 = Debug|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Debug|x86-Net4.ActiveCfg = Debug|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Release|x64-Net3.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Release|x64-Net3.Build.0 = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Release|x64-Net4.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Release|x86-Net3.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Release|x86-Net3.Build.0 = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Release|x86-Net4.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose_Release|x64-Net3.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose_Release|x64-Net3.Build.0 = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose_Release|x64-Net4.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose_Release|x86-Net3.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose_Release|x86-Net3.Build.0 = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose_Release|x86-Net4.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose|x64-Net3.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose|x64-Net3.Build.0 = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose|x64-Net4.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose|x86-Net3.ActiveCfg = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose|x86-Net3.Build.0 = Release|Any CPU
{642F52DA-90F9-40E3-8784-6964F36752FB}.Verbose|x86-Net4.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE


+ 7
- 0
IPA.Injector/IPA.Injector.csproj View File

@ -75,6 +75,10 @@
<Project>{5ad344f0-01a0-4ca8-92e5-9d095737744d}</Project>
<Name>IPA.Loader</Name>
</ProjectReference>
<ProjectReference Include="..\Net3-Proxy\Net3-Proxy.csproj" Condition=" '$(Platform)' == 'Net3' " >
<Project>{642F52DA-90F9-40E3-8784-6964F36752FB}</Project>
<Name>Net3-Proxy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'Net4' " >
<Content Include="..\Libs\I18N.Net4.dll">
@ -118,6 +122,9 @@
<PackageReference Include="SemanticVersioning">
<Version>1.2.0</Version>
</PackageReference>
<PackageReference Include="AsyncBridge" Condition=" '$(Platform)' == 'Net3' " >
<Version>0.3.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">


+ 4
- 0
IPA.Loader/Config/Config.cs View File

@ -5,6 +5,10 @@ using System.Linq;
using System.Reflection;
using IPA.Config.ConfigProviders;
using IPA.Utilities;
#if NET3
using Net3_Proxy;
using Path = Net3_Proxy.Path;
#endif
namespace IPA.Config
{


+ 6
- 0
IPA.Loader/Config/ConfigProviders/JsonConfigProvider.cs View File

@ -18,8 +18,10 @@ namespace IPA.Config.ConfigProviders
private JObject jsonObj;
#if NET4
// TODO: create a wrapper that allows empty object creation
public dynamic Dynamic => jsonObj;
#endif
public bool HasChanged { get; private set; }
public bool InMemoryChanged { get; set; }
@ -72,14 +74,18 @@ namespace IPA.Config.ConfigProviders
{
jsonObj.PropertyChanged += JsonObj_PropertyChanged;
jsonObj.ListChanged += JsonObj_ListChanged;
#if NET4
jsonObj.CollectionChanged += JsonObj_CollectionChanged;
#endif
}
#if NET4
private void JsonObj_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
HasChanged = true;
InMemoryChanged = true;
}
#endif
private void JsonObj_ListChanged(object sender, ListChangedEventArgs e)
{


+ 4
- 2
IPA.Loader/Config/IConfigProvider.cs View File

@ -21,13 +21,15 @@ namespace IPA.Config
/// <param name="obj">the object containing the data to save</param>
void Store<T>(T obj);
#if NET4
/// <summary>
/// Gets a dynamic object providing access to the configuration.
/// </summary>
/// <value>a dynamically bound object to use to access config values directly</value>
dynamic Dynamic { get; }
#endif
#region State getters
#region State getters
/// <summary>
/// Returns <see langword="true"/> if object has changed since the last save
/// </summary>
@ -56,6 +58,6 @@ namespace IPA.Config
/// Loads the state of the file on disk.
/// </summary>
void Load();
#endregion
#endregion
}
}

+ 3
- 0
IPA.Loader/Config/ModPrefs.cs View File

@ -2,6 +2,9 @@
using System.Globalization;
using System.IO;
using IPA.Loader;
#if NET3
using Path = Net3_Proxy.Path;
#endif
namespace IPA.Config
{


+ 9
- 0
IPA.Loader/IPA.Loader.csproj View File

@ -78,6 +78,12 @@
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Net3-Proxy\Net3-Proxy.csproj" Condition=" '$(Platform)' == 'Net3' " >
<Project>{642F52DA-90F9-40E3-8784-6964F36752FB}</Project>
<Name>Net3-Proxy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Config\Config.cs" />
<Compile Include="Config\ConfigProviders\JsonConfigProvider.cs" />
@ -149,6 +155,9 @@
<PackageReference Include="SemanticVersioning">
<Version>1.2.0</Version>
</PackageReference>
<PackageReference Include="AsyncBridge" Condition=" '$(Platform)' == 'Net3' " >
<Version>0.3.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Loader\manifest.json" />


+ 3
- 0
IPA.Loader/Loader/Features/Feature.cs View File

@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
#if NET3
using Net3_Proxy;
#endif
namespace IPA.Loader.Features
{


+ 3
- 0
IPA.Loader/Loader/PluginInitInjector.cs View File

@ -5,6 +5,9 @@ using System.Reflection;
using IPA.Config;
using IPA.Logging;
using IPA.Utilities;
#if NET3
using Net3_Proxy;
#endif
namespace IPA.Loader
{


+ 6
- 1
IPA.Loader/Loader/PluginLoader.cs View File

@ -11,6 +11,11 @@ using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Version = SemVer.Version;
#if NET3
using Net3_Proxy;
using Path = Net3_Proxy.Path;
using File = Net3_Proxy.File;
#endif
namespace IPA.Loader
{
@ -19,7 +24,7 @@ namespace IPA.Loader
/// </summary>
public class PluginLoader
{
internal static Task LoadTask() => Task.Run(() =>
internal static Task LoadTask() => Task.Factory.StartNew(() =>
{
LoadMetadata();


+ 5
- 0
IPA.Loader/Loader/PluginManager.cs View File

@ -13,6 +13,11 @@ using Mono.Cecil;
using UnityEngine;
using Logger = IPA.Logging.Logger;
using static IPA.Loader.PluginLoader;
#if NET3
using Net3_Proxy;
using Path = Net3_Proxy.Path;
using File = Net3_Proxy.File;
#endif
namespace IPA.Loader
{


+ 4
- 0
IPA.Loader/Logging/Printers/GZFilePrinter.cs View File

@ -4,6 +4,10 @@ using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
#if NET3
using Net3_Proxy;
using Path = Net3_Proxy.Path;
#endif
namespace IPA.Logging.Printers
{


+ 3
- 0
IPA.Loader/Logging/Printers/PluginSubLogPrinter.cs View File

@ -1,6 +1,9 @@
using System;
using System.IO;
using IPA.Utilities;
#if NET3
using Path = Net3_Proxy.Path;
#endif
namespace IPA.Logging.Printers
{


+ 2
- 2
IPA.Loader/Logging/StdoutInterceptor.cs View File

@ -121,8 +121,8 @@ namespace IPA.Logging
var console = typeof(Console);
var resetColor = console.GetMethod("ResetColor");
var foregroundProperty = console.GetProperty("ForegroundColor");
var setFg = foregroundProperty.SetMethod;
var getFg = foregroundProperty.GetMethod;
var setFg = foregroundProperty.GetSetMethod();
var getFg = foregroundProperty.GetGetMethod();
harmony.Patch(resetColor, transpiler: new HarmonyMethod(typeof(ConsoleHarmonyPatches), "PatchResetColor"));
harmony.Patch(setFg, transpiler: new HarmonyMethod(typeof(ConsoleHarmonyPatches), "PatchSetForegroundColor"));


+ 3
- 1
IPA.Loader/Utilities/BeatSaber.cs View File

@ -2,7 +2,9 @@
using System.IO;
using System.Reflection;
using UnityEngine;
using Version = SemVer.Version;
#if NET3
using Path = Net3_Proxy.Path;
#endif
namespace IPA.Utilities
{


+ 3
- 0
IPA.Loader/Utilities/Utils.cs View File

@ -1,6 +1,9 @@
using System;
using System.IO;
using System.Text;
#if NET3
using File = Net3_Proxy.File;
#endif
namespace IPA.Utilities
{


+ 167
- 0
Net3-Proxy/Extensions.cs View File

@ -0,0 +1,167 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Net3_Proxy
{
public static class Extensions
{
public static T GetCustomAttribute<T>(this ParameterInfo element) where T : Attribute
=> (T)GetCustomAttribute(element, typeof(T));
public static Attribute GetCustomAttribute(this MemberInfo element, Type attributeType)
=> Attribute.GetCustomAttribute(element, attributeType);
public static Attribute GetCustomAttribute(this ParameterInfo element, Type attributeType)
=> Attribute.GetCustomAttribute(element, attributeType);
public static StringBuilder Clear(this StringBuilder sb)
=> sb.Remove(0, sb.Length);
}
public static class DirectoryInfoExtensions
{
public static IEnumerable<FileInfo> EnumerateFiles(this DirectoryInfo self)
{
return self.EnumerateFiles("*", SearchOption.TopDirectoryOnly);
}
public static IEnumerable<FileInfo> EnumerateFiles(this DirectoryInfo self, string searchPattern)
{
return self.EnumerateFiles(searchPattern, SearchOption.TopDirectoryOnly);
}
public static IEnumerable<FileInfo> EnumerateFiles(this DirectoryInfo self, string searchPattern, SearchOption searchOption)
{
if (searchPattern == null)
{
throw new ArgumentNullException("searchPattern");
}
return CreateEnumerateFilesIterator(self, searchPattern, searchOption);
}
private static IEnumerable<FileInfo> CreateEnumerateFilesIterator(DirectoryInfo self, string searchPattern, SearchOption searchOption)
{
foreach (string fileName in Directory.GetFiles(self.FullName, searchPattern, searchOption))
yield return new FileInfo(fileName);
yield break;
}
}
public static class StreamExtensions
{
[ComVisible(false)]
[HostProtection(SecurityAction.LinkDemand, ExternalThreading = true)]
public static Task CopyToAsync(this Stream src, Stream destination) => CopyToAsync(src, destination, 81920);
[ComVisible(false)]
[HostProtection(SecurityAction.LinkDemand, ExternalThreading = true)]
public static Task CopyToAsync(this Stream src, Stream destination, int bufferSize) => CopyToAsync(src, destination, bufferSize, CancellationToken.None);
[ComVisible(false)]
[HostProtection(SecurityAction.LinkDemand, ExternalThreading = true)]
public static Task CopyToAsync(this Stream src, Stream destination, int bufferSize, CancellationToken cancellationToken)
{
if (destination == null)
{
throw new ArgumentNullException("destination");
}
if (bufferSize <= 0)
{
throw new ArgumentOutOfRangeException("bufferSize", "Positive number required.");
}
if (!src.CanRead && !src.CanWrite)
{
throw new ObjectDisposedException(null, "Cannot access a closed Stream.");
}
if (!destination.CanRead && !destination.CanWrite)
{
throw new ObjectDisposedException("destination", "Cannot access a closed Stream.");
}
if (!src.CanRead)
{
throw new NotSupportedException("Stream does not support reading.");
}
if (!destination.CanWrite)
{
throw new NotSupportedException("Stream does not support writing.");
}
return CopyToAsyncInternal(src, destination, bufferSize, cancellationToken);
}
private static async Task CopyToAsyncInternal(Stream src, Stream destination, int bufferSize, CancellationToken cancellationToken)
{
byte[] buffer = new byte[bufferSize];
int bytesRead;
while ((bytesRead = await src.ReadAsync(buffer, 0, buffer.Length, cancellationToken)) != 0)
{
await destination.WriteAsync(buffer, 0, bytesRead, cancellationToken);
}
}
[ComVisible(false)]
[HostProtection(SecurityAction.LinkDemand, ExternalThreading = true)]
public static Task<int> ReadAsync(this Stream src, byte[] buffer, int offset, int count)
{
return ReadAsync(src, buffer, offset, count, CancellationToken.None);
}
[ComVisible(false)]
[HostProtection(SecurityAction.LinkDemand, ExternalThreading = true)]
public static Task<int> ReadAsync(this Stream src, byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
if (!cancellationToken.IsCancellationRequested)
{
return BeginEndReadAsync(src, buffer, offset, count);
}
return new Task<int>(() => 0, cancellationToken);
}
private static Task<int> BeginEndReadAsync(Stream src, byte[] buffer, int offset, int count)
=> Task<int>.Factory.FromAsync(
(byte[] buffer_, int offset_, int count_, AsyncCallback callback, object state) =>
src.BeginRead(buffer_, offset_, count_, callback, state),
(IAsyncResult asyncResult) => src.EndRead(asyncResult),
buffer,
offset,
count,
new object());
[ComVisible(false)]
[HostProtection(SecurityAction.LinkDemand, ExternalThreading = true)]
public static Task WriteAsync(this Stream src, byte[] buffer, int offset, int count)
{
return WriteAsync(src, buffer, offset, count, CancellationToken.None);
}
[ComVisible(false)]
[HostProtection(SecurityAction.LinkDemand, ExternalThreading = true)]
public static Task WriteAsync(this Stream src, byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
if (!cancellationToken.IsCancellationRequested)
{
return BeginEndWriteAsync(src, buffer, offset, count);
}
return new Task<int>(() => 0, cancellationToken);
}
private static Task BeginEndWriteAsync(Stream src, byte[] buffer, int offset, int count)
=> Task.Factory.FromAsync(
(byte[] buffer_, int offset_, int count_, AsyncCallback callback, object state) =>
src.BeginWrite(buffer_, offset_, count_, callback, state),
(IAsyncResult asyncResult) => src.EndWrite(asyncResult),
buffer,
offset,
count,
new object());
}
}

+ 27
- 0
Net3-Proxy/File.cs View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using OgFile = System.IO.File;
namespace Net3_Proxy
{
public static class File
{
public static string ReadAllText(string fn) => OgFile.ReadAllText(fn);
public static string ReadAllText(string fn, Encoding enc) => OgFile.ReadAllText(fn, enc);
public static bool Exists(string fn) => OgFile.Exists(fn);
public static void Delete(string fn) => OgFile.Delete(fn);
public static void AppendAllLines(string path, IEnumerable<string> contents)
{
Path.Validate(path);
if (contents == null)
return;
using (TextWriter textWriter = new StreamWriter(path, true))
foreach (string value in contents)
textWriter.WriteLine(value);
}
public static string[] ReadAllLines(string p) => OgFile.ReadAllLines(p);
}
}

+ 29
- 0
Net3-Proxy/IReadOnlyList.cs View File

@ -0,0 +1,29 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Net3_Proxy
{
public class IReadOnlyList<T> : IEnumerable<T>
{
private IList<T> list;
private IReadOnlyList(IList<T> lst)
{
list = lst;
}
public IEnumerator<T> GetEnumerator() => list.GetEnumerator();
IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable)list).GetEnumerator();
public int Count => list.Count;
public T this[int index] => list[index];
public static implicit operator IReadOnlyList<T>(List<T> list) => new IReadOnlyList<T>(list);
}
}

+ 56
- 0
Net3-Proxy/Net3-Proxy.csproj View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{642F52DA-90F9-40E3-8784-6964F36752FB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Net3_Proxy</RootNamespace>
<AssemblyName>Net3-Proxy</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Extensions.cs" />
<Compile Include="File.cs" />
<Compile Include="IReadOnlyList.cs" />
<Compile Include="Path.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tuple.cs" />
<Compile Include="Utils.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AsyncBridge">
<Version>0.3.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

+ 56
- 0
Net3-Proxy/Path.cs View File

@ -0,0 +1,56 @@
using System;
using System.Linq;
using OgPath = System.IO.Path;
namespace Net3_Proxy
{
public static class Path
{
internal static void Validate(string path)
{
Path.Validate(path, "path");
}
internal static void Validate(string path, string parameterName)
{
if (path == null)
{
throw new ArgumentNullException(parameterName);
}
if (Utils.IsNullOrWhiteSpace(path))
{
throw new ArgumentException("Path is empty");
}
if (path.IndexOfAny(OgPath.GetInvalidPathChars()) != -1)
{
throw new ArgumentException("Path contains invalid chars");
}
if (Environment.OSVersion.Platform < PlatformID.Unix)
{
int num = path.IndexOf(':');
if (num >= 0 && num != 1)
{
throw new ArgumentException(parameterName);
}
}
}
public static string GetFullPath(string p) => OgPath.GetFullPath(p);
public static string GetFileNameWithoutExtension(string p) => OgPath.GetFileNameWithoutExtension(p);
public static string GetFileName(string p) => OgPath.GetFileName(p);
public static string GetDirectoryName(string p) => OgPath.GetDirectoryName(p);
public static string Combine(string s) => s;
public static string Combine(string s, string d) => OgPath.Combine(s, d);
public static string Combine(string s, string d, string f) => Combine(s, Combine(d, f));
public static string Combine(string s, string d, string f, string g) => Combine(Combine(s, d), Combine(f, g));
public static string Combine(params string[] parts)
{
if (parts.Length == 0) return "";
var begin = parts[0];
foreach (var p in parts.Skip(1))
begin = Combine(begin, p);
return begin;
}
}
}

+ 36
- 0
Net3-Proxy/Properties/AssemblyInfo.cs View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Net3-Proxy")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Net3-Proxy")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("642f52da-90f9-40e3-8784-6964f36752fb")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

+ 53
- 0
Net3-Proxy/Tuple.cs View File

@ -0,0 +1,53 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Net3_Proxy
{
public static class Tuple
{
public static Tuple<T1, T2> Create<T1, T2>(T1 i1, T2 i2)
=> new Tuple<T1, T2>(i1, i2);
internal static int CombineHashCodes(int h1, int h2)
{
return (h1 << 5) + h1 ^ h2;
}
}
[Serializable]
public class Tuple<T1, T2> : IComparable
{
public T1 Item1 { get; private set; }
public T2 Item2 { get; private set; }
public Tuple(T1 item1, T2 item2)
{
Item1 = item1;
Item2 = item2;
}
public override bool Equals(object obj)
=> obj is Tuple<T1, T2> tup
&& Equals(Item1, tup.Item1)
&& Equals(Item2, tup.Item2);
int IComparable.CompareTo(object obj)
{
if (obj == null) return 1;
var tup = obj as Tuple<T1, T2>;
if (tup == null) throw new ArgumentException($"Argument must be of type {GetType()}.", "other");
int num = Comparer<T1>.Default.Compare(Item1, tup.Item1);
if (num != 0) return num;
return Comparer<T2>.Default.Compare(Item2, tup.Item2);
}
public override int GetHashCode() =>
Tuple.CombineHashCodes(EqualityComparer<T1>.Default.GetHashCode(Item1), EqualityComparer<T2>.Default.GetHashCode(Item2));
public override string ToString() =>
$"({Item1}, {Item2})";
}
}

+ 26
- 0
Net3-Proxy/Utils.cs View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Net3_Proxy
{
internal static class Utils
{
public static bool IsNullOrWhiteSpace(string value)
{
if (value == null)
{
return true;
}
for (int i = 0; i < value.Length; i++)
{
if (!char.IsWhiteSpace(value[i]))
{
return false;
}
}
return true;
}
}
}

Loading…
Cancel
Save