diff --git a/src/1Script.sln b/src/1Script.sln
index ee4c3a253..86a0b9a0f 100644
--- a/src/1Script.sln
+++ b/src/1Script.sln
@@ -69,268 +69,403 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
+ Debug|x64 = Debug|x64
LinuxDebug|Any CPU = LinuxDebug|Any CPU
LinuxDebug|x86 = LinuxDebug|x86
+ LinuxDebug|x64 = LinuxDebug|x64
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Debug|x86.ActiveCfg = Release|Any CPU
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Debug|x86.Build.0 = Release|Any CPU
+ {4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Debug|x64.Build.0 = Debug|Any CPU
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.LinuxDebug|x86.ActiveCfg = LinuxDebug|x86
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.LinuxDebug|x86.Build.0 = LinuxDebug|x86
+ {4585BA5D-9EC4-4C89-8250-2033D2AC2999}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {4585BA5D-9EC4-4C89-8250-2033D2AC2999}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Release|Any CPU.Build.0 = Release|Any CPU
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Release|x86.ActiveCfg = Release|x86
{4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Release|x86.Build.0 = Release|x86
+ {4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Release|x64.ActiveCfg = Release|Any CPU
+ {4585BA5D-9EC4-4C89-8250-2033D2AC2999}.Release|x64.Build.0 = Release|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Debug|x86.ActiveCfg = Debug|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Debug|x86.Build.0 = Debug|Any CPU
+ {F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Debug|x64.Build.0 = Debug|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Release|Any CPU.Build.0 = Release|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Release|x86.ActiveCfg = Release|Any CPU
{F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Release|x86.Build.0 = Release|Any CPU
+ {F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Release|x64.ActiveCfg = Release|Any CPU
+ {F062D1D9-D307-492A-A56B-FF3C55F8F6C0}.Release|x64.Build.0 = Release|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Debug|x86.ActiveCfg = Debug|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Debug|x86.Build.0 = Debug|Any CPU
+ {F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Debug|x64.Build.0 = Debug|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {F09A46BD-5737-45E7-BA60-A47C9F7821A9}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {F09A46BD-5737-45E7-BA60-A47C9F7821A9}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Release|Any CPU.Build.0 = Release|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Release|x86.ActiveCfg = Release|Any CPU
{F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Release|x86.Build.0 = Release|Any CPU
+ {F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Release|x64.ActiveCfg = Release|Any CPU
+ {F09A46BD-5737-45E7-BA60-A47C9F7821A9}.Release|x64.Build.0 = Release|Any CPU
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Debug|x86.ActiveCfg = Debug|x86
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Debug|x86.Build.0 = Debug|x86
+ {2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Debug|x64.Build.0 = Debug|Any CPU
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.LinuxDebug|x86.ActiveCfg = LinuxDebug|x86
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.LinuxDebug|x86.Build.0 = LinuxDebug|x86
+ {2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Release|Any CPU.Build.0 = Release|Any CPU
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Release|x86.ActiveCfg = Release|x86
{2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Release|x86.Build.0 = Release|x86
+ {2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Release|x64.ActiveCfg = Release|Any CPU
+ {2590E2BB-CC1F-4775-80ED-451F45C9A4F1}.Release|x64.Build.0 = Release|Any CPU
{B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.Debug|x64.Build.0 = Debug|Any CPU
{B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.Release|x86.ActiveCfg = Release|Any CPU
+ {B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.Release|x64.ActiveCfg = Release|Any CPU
+ {B6C3C000-699B-4A2F-92D1-EEAEA9CFE2AB}.Release|x64.Build.0 = Release|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.Debug|x86.ActiveCfg = Debug|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.Debug|x86.Build.0 = Debug|Any CPU
+ {C979F151-AA29-47E4-B020-3039BA0986D9}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C979F151-AA29-47E4-B020-3039BA0986D9}.Debug|x64.Build.0 = Debug|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {C979F151-AA29-47E4-B020-3039BA0986D9}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {C979F151-AA29-47E4-B020-3039BA0986D9}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.Release|Any CPU.Build.0 = Release|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.Release|x86.ActiveCfg = Release|Any CPU
{C979F151-AA29-47E4-B020-3039BA0986D9}.Release|x86.Build.0 = Release|Any CPU
+ {C979F151-AA29-47E4-B020-3039BA0986D9}.Release|x64.ActiveCfg = Release|Any CPU
+ {C979F151-AA29-47E4-B020-3039BA0986D9}.Release|x64.Build.0 = Release|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.Debug|Any CPU.Build.0 = Debug|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.Debug|x86.ActiveCfg = Debug|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.Debug|x86.Build.0 = Debug|Any CPU
+ {727A498F-BF50-42F8-8523-40C0B5B1B233}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {727A498F-BF50-42F8-8523-40C0B5B1B233}.Debug|x64.Build.0 = Debug|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {727A498F-BF50-42F8-8523-40C0B5B1B233}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {727A498F-BF50-42F8-8523-40C0B5B1B233}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.Release|Any CPU.ActiveCfg = Release|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.Release|Any CPU.Build.0 = Release|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.Release|x86.ActiveCfg = Release|Any CPU
{727A498F-BF50-42F8-8523-40C0B5B1B233}.Release|x86.Build.0 = Release|Any CPU
+ {727A498F-BF50-42F8-8523-40C0B5B1B233}.Release|x64.ActiveCfg = Release|Any CPU
+ {727A498F-BF50-42F8-8523-40C0B5B1B233}.Release|x64.Build.0 = Release|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Debug|x86.ActiveCfg = Debug|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Debug|x86.Build.0 = Debug|Any CPU
+ {0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Debug|x64.Build.0 = Debug|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Release|Any CPU.Build.0 = Release|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Release|x86.ActiveCfg = Release|Any CPU
{0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Release|x86.Build.0 = Release|Any CPU
+ {0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Release|x64.ActiveCfg = Release|Any CPU
+ {0B30DF8B-BD15-4C63-9CC4-1E123566B5B3}.Release|x64.Build.0 = Release|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.Debug|x86.ActiveCfg = Debug|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.Debug|x86.Build.0 = Debug|Any CPU
+ {872BFF20-7AD9-4741-B163-CD648AD3418F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {872BFF20-7AD9-4741-B163-CD648AD3418F}.Debug|x64.Build.0 = Debug|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {872BFF20-7AD9-4741-B163-CD648AD3418F}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {872BFF20-7AD9-4741-B163-CD648AD3418F}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.Release|Any CPU.Build.0 = Release|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.Release|x86.ActiveCfg = Release|Any CPU
{872BFF20-7AD9-4741-B163-CD648AD3418F}.Release|x86.Build.0 = Release|Any CPU
+ {872BFF20-7AD9-4741-B163-CD648AD3418F}.Release|x64.ActiveCfg = Release|Any CPU
+ {872BFF20-7AD9-4741-B163-CD648AD3418F}.Release|x64.Build.0 = Release|Any CPU
{76F2521D-44D7-48C9-A678-074E22B46092}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76F2521D-44D7-48C9-A678-074E22B46092}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76F2521D-44D7-48C9-A678-074E22B46092}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {76F2521D-44D7-48C9-A678-074E22B46092}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {76F2521D-44D7-48C9-A678-074E22B46092}.Debug|x64.Build.0 = Debug|Any CPU
{76F2521D-44D7-48C9-A678-074E22B46092}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{76F2521D-44D7-48C9-A678-074E22B46092}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{76F2521D-44D7-48C9-A678-074E22B46092}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{76F2521D-44D7-48C9-A678-074E22B46092}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {76F2521D-44D7-48C9-A678-074E22B46092}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {76F2521D-44D7-48C9-A678-074E22B46092}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{76F2521D-44D7-48C9-A678-074E22B46092}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76F2521D-44D7-48C9-A678-074E22B46092}.Release|Any CPU.Build.0 = Release|Any CPU
{76F2521D-44D7-48C9-A678-074E22B46092}.Release|x86.ActiveCfg = Release|Any CPU
+ {76F2521D-44D7-48C9-A678-074E22B46092}.Release|x64.ActiveCfg = Release|Any CPU
+ {76F2521D-44D7-48C9-A678-074E22B46092}.Release|x64.Build.0 = Release|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Debug|x86.ActiveCfg = Debug|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Debug|x86.Build.0 = Debug|Any CPU
+ {4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Debug|x64.Build.0 = Debug|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {4FF7C82D-BFEF-415E-81FF-5C0337E99845}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {4FF7C82D-BFEF-415E-81FF-5C0337E99845}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Release|Any CPU.Build.0 = Release|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Release|x86.ActiveCfg = Release|Any CPU
{4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Release|x86.Build.0 = Release|Any CPU
+ {4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Release|x64.ActiveCfg = Release|Any CPU
+ {4FF7C82D-BFEF-415E-81FF-5C0337E99845}.Release|x64.Build.0 = Release|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Debug|x86.ActiveCfg = Debug|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Debug|x86.Build.0 = Debug|Any CPU
+ {86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Debug|x64.Build.0 = Debug|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {86CFEC6C-2835-4EEB-9842-14B6A455A80C}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {86CFEC6C-2835-4EEB-9842-14B6A455A80C}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Release|Any CPU.Build.0 = Release|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Release|x86.ActiveCfg = Release|Any CPU
{86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Release|x86.Build.0 = Release|Any CPU
+ {86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Release|x64.ActiveCfg = Release|Any CPU
+ {86CFEC6C-2835-4EEB-9842-14B6A455A80C}.Release|x64.Build.0 = Release|Any CPU
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Debug|Any CPU.ActiveCfg = Debug|x64
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Debug|Any CPU.Build.0 = Debug|x64
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Debug|x86.ActiveCfg = Debug|Win32
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Debug|x86.Build.0 = Debug|Win32
+ {2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Debug|x64.ActiveCfg = Debug|x64
+ {2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Debug|x64.Build.0 = Debug|x64
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.LinuxDebug|x64.ActiveCfg = LinuxDebug|x64
+ {2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.LinuxDebug|x64.Build.0 = LinuxDebug|x64
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Release|Any CPU.ActiveCfg = Release|x64
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Release|Any CPU.Build.0 = Release|x64
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Release|x86.ActiveCfg = Release|Win32
{2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Release|x86.Build.0 = Release|Win32
+ {2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Release|x64.ActiveCfg = Release|x64
+ {2D3C486D-B370-451C-8B0C-EFF2D6C9FB61}.Release|x64.Build.0 = Release|x64
{55890DF2-D13E-4C89-A01D-79CAD6726246}.Debug|Any CPU.ActiveCfg = Debug|x64
{55890DF2-D13E-4C89-A01D-79CAD6726246}.Debug|Any CPU.Build.0 = Debug|x64
{55890DF2-D13E-4C89-A01D-79CAD6726246}.Debug|x86.ActiveCfg = Debug|Win32
{55890DF2-D13E-4C89-A01D-79CAD6726246}.Debug|x86.Build.0 = Debug|Win32
+ {55890DF2-D13E-4C89-A01D-79CAD6726246}.Debug|x64.ActiveCfg = Debug|x64
+ {55890DF2-D13E-4C89-A01D-79CAD6726246}.Debug|x64.Build.0 = Debug|x64
{55890DF2-D13E-4C89-A01D-79CAD6726246}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{55890DF2-D13E-4C89-A01D-79CAD6726246}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{55890DF2-D13E-4C89-A01D-79CAD6726246}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {55890DF2-D13E-4C89-A01D-79CAD6726246}.LinuxDebug|x64.ActiveCfg = LinuxDebug|x64
+ {55890DF2-D13E-4C89-A01D-79CAD6726246}.LinuxDebug|x64.Build.0 = LinuxDebug|x64
{55890DF2-D13E-4C89-A01D-79CAD6726246}.Release|Any CPU.ActiveCfg = Release|x64
{55890DF2-D13E-4C89-A01D-79CAD6726246}.Release|Any CPU.Build.0 = Release|x64
{55890DF2-D13E-4C89-A01D-79CAD6726246}.Release|x86.ActiveCfg = Release|Win32
{55890DF2-D13E-4C89-A01D-79CAD6726246}.Release|x86.Build.0 = Release|Win32
+ {55890DF2-D13E-4C89-A01D-79CAD6726246}.Release|x64.ActiveCfg = Release|x64
+ {55890DF2-D13E-4C89-A01D-79CAD6726246}.Release|x64.Build.0 = Release|x64
{6D02017A-189F-45D7-B286-D67536AB4907}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.Debug|x86.ActiveCfg = Debug|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.Debug|x86.Build.0 = Debug|Any CPU
+ {6D02017A-189F-45D7-B286-D67536AB4907}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6D02017A-189F-45D7-B286-D67536AB4907}.Debug|x64.Build.0 = Debug|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {6D02017A-189F-45D7-B286-D67536AB4907}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {6D02017A-189F-45D7-B286-D67536AB4907}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.Release|Any CPU.Build.0 = Release|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.Release|x86.ActiveCfg = Release|Any CPU
{6D02017A-189F-45D7-B286-D67536AB4907}.Release|x86.Build.0 = Release|Any CPU
+ {6D02017A-189F-45D7-B286-D67536AB4907}.Release|x64.ActiveCfg = Release|Any CPU
+ {6D02017A-189F-45D7-B286-D67536AB4907}.Release|x64.Build.0 = Release|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.Debug|x86.ActiveCfg = Debug|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.Debug|x86.Build.0 = Debug|Any CPU
+ {B17AE4BE-3640-49CB-B771-C9D653067C5E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B17AE4BE-3640-49CB-B771-C9D653067C5E}.Debug|x64.Build.0 = Debug|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {B17AE4BE-3640-49CB-B771-C9D653067C5E}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {B17AE4BE-3640-49CB-B771-C9D653067C5E}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.Release|Any CPU.Build.0 = Release|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.Release|x86.ActiveCfg = Release|Any CPU
{B17AE4BE-3640-49CB-B771-C9D653067C5E}.Release|x86.Build.0 = Release|Any CPU
+ {B17AE4BE-3640-49CB-B771-C9D653067C5E}.Release|x64.ActiveCfg = Release|Any CPU
+ {B17AE4BE-3640-49CB-B771-C9D653067C5E}.Release|x64.Build.0 = Release|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.Debug|x86.ActiveCfg = Debug|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.Debug|x86.Build.0 = Debug|Any CPU
+ {6A246728-007D-4C1E-830A-DC8420ACA864}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6A246728-007D-4C1E-830A-DC8420ACA864}.Debug|x64.Build.0 = Debug|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {6A246728-007D-4C1E-830A-DC8420ACA864}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {6A246728-007D-4C1E-830A-DC8420ACA864}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.Release|Any CPU.Build.0 = Release|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.Release|x86.ActiveCfg = Release|Any CPU
{6A246728-007D-4C1E-830A-DC8420ACA864}.Release|x86.Build.0 = Release|Any CPU
+ {6A246728-007D-4C1E-830A-DC8420ACA864}.Release|x64.ActiveCfg = Release|Any CPU
+ {6A246728-007D-4C1E-830A-DC8420ACA864}.Release|x64.Build.0 = Release|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Debug|x86.ActiveCfg = Debug|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Debug|x86.Build.0 = Debug|Any CPU
+ {0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Debug|x64.Build.0 = Debug|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Release|Any CPU.Build.0 = Release|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Release|x86.ActiveCfg = Release|Any CPU
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Release|x86.Build.0 = Release|Any CPU
+ {0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Release|x64.ActiveCfg = Release|Any CPU
+ {0F5E6099-39BA-41CF-B55F-357F7DF4DE00}.Release|x64.Build.0 = Release|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Debug|x86.ActiveCfg = Debug|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Debug|x86.Build.0 = Debug|Any CPU
+ {90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Debug|x64.Build.0 = Debug|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.LinuxDebug|Any CPU.ActiveCfg = LinuxDebug|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.LinuxDebug|Any CPU.Build.0 = LinuxDebug|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.LinuxDebug|x86.ActiveCfg = LinuxDebug|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.LinuxDebug|x86.Build.0 = LinuxDebug|Any CPU
+ {90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Release|Any CPU.Build.0 = Release|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Release|x86.ActiveCfg = Release|Any CPU
{90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Release|x86.Build.0 = Release|Any CPU
+ {90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Release|x64.ActiveCfg = Release|Any CPU
+ {90E896C1-FEAE-4C71-8E47-3E3F2D9C926C}.Release|x64.Build.0 = Release|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Debug|x86.ActiveCfg = Debug|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Debug|x86.Build.0 = Debug|Any CPU
+ {2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Debug|x64.Build.0 = Debug|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.LinuxDebug|Any CPU.ActiveCfg = Debug|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.LinuxDebug|Any CPU.Build.0 = Debug|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.LinuxDebug|x86.ActiveCfg = Debug|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.LinuxDebug|x86.Build.0 = Debug|Any CPU
+ {2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Release|Any CPU.Build.0 = Release|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Release|x86.ActiveCfg = Release|Any CPU
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Release|x86.Build.0 = Release|Any CPU
+ {2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Release|x64.ActiveCfg = Release|Any CPU
+ {2F264379-B3B4-44B3-9CBA-A4B0AF3D8785}.Release|x64.Build.0 = Release|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.Debug|x86.ActiveCfg = Debug|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.Debug|x86.Build.0 = Debug|Any CPU
+ {8873BA09-919E-4439-8EEB-87CB8E74656C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8873BA09-919E-4439-8EEB-87CB8E74656C}.Debug|x64.Build.0 = Debug|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.LinuxDebug|Any CPU.ActiveCfg = Debug|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.LinuxDebug|Any CPU.Build.0 = Debug|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.LinuxDebug|x86.ActiveCfg = Debug|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.LinuxDebug|x86.Build.0 = Debug|Any CPU
+ {8873BA09-919E-4439-8EEB-87CB8E74656C}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {8873BA09-919E-4439-8EEB-87CB8E74656C}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.Release|Any CPU.Build.0 = Release|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.Release|x86.ActiveCfg = Release|Any CPU
{8873BA09-919E-4439-8EEB-87CB8E74656C}.Release|x86.Build.0 = Release|Any CPU
+ {8873BA09-919E-4439-8EEB-87CB8E74656C}.Release|x64.ActiveCfg = Release|Any CPU
+ {8873BA09-919E-4439-8EEB-87CB8E74656C}.Release|x64.Build.0 = Release|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Debug|x86.ActiveCfg = Debug|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Debug|x86.Build.0 = Debug|Any CPU
+ {BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Debug|x64.Build.0 = Debug|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.LinuxDebug|Any CPU.ActiveCfg = Debug|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.LinuxDebug|Any CPU.Build.0 = Debug|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.LinuxDebug|x86.ActiveCfg = Debug|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.LinuxDebug|x86.Build.0 = Debug|Any CPU
+ {BD385142-E9B4-43C1-8F88-067F24E5AF6D}.LinuxDebug|x64.ActiveCfg = LinuxDebug|Any CPU
+ {BD385142-E9B4-43C1-8F88-067F24E5AF6D}.LinuxDebug|x64.Build.0 = LinuxDebug|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Release|Any CPU.Build.0 = Release|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Release|x86.ActiveCfg = Release|Any CPU
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Release|x86.Build.0 = Release|Any CPU
+ {BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Release|x64.ActiveCfg = Release|Any CPU
+ {BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/OneScript.StandardLibrary/Binary/BinaryDataConstants.cs b/src/OneScript.StandardLibrary/Binary/BinaryDataConstants.cs
new file mode 100644
index 000000000..7a5dc01ed
--- /dev/null
+++ b/src/OneScript.StandardLibrary/Binary/BinaryDataConstants.cs
@@ -0,0 +1,25 @@
+/*----------------------------------------------------------
+This Source Code Form is subject to the terms of the
+Mozilla Public License, v.2.0. If a copy of the MPL
+was not distributed with this file, You can obtain one
+at http://mozilla.org/MPL/2.0/.
+----------------------------------------------------------*/
+
+using System;
+
+namespace OneScript.StandardLibrary.Binary
+{
+ public static class BinaryDataConstants
+ {
+ ///
+ /// Максимальный размер массива, доступный в среде выполнения.
+ /// Де-факто он чуть меньше 2Гб, он же Int32.MaxValue, поэтому используется системная константа
+ ///
+ public static readonly int SYSTEM_IN_MEMORY_LIMIT = Array.MaxLength;
+
+ ///
+ /// Размер двоичных данных, хранимый в памяти по умолчанию.
+ ///
+ public const int DEFAULT_IN_MEMORY_LIMIT = 1024 * 1024 * 50;
+ }
+}
\ No newline at end of file
diff --git a/src/OneScript.StandardLibrary/Binary/BinaryDataContext.cs b/src/OneScript.StandardLibrary/Binary/BinaryDataContext.cs
index e56d15ed3..4ef0ee605 100644
--- a/src/OneScript.StandardLibrary/Binary/BinaryDataContext.cs
+++ b/src/OneScript.StandardLibrary/Binary/BinaryDataContext.cs
@@ -24,10 +24,10 @@ public sealed class BinaryDataContext : AutoContext, IDisposa
private byte[] _buffer;
private BackingTemporaryFile _backingFile;
- public BinaryDataContext(string filename)
+ public BinaryDataContext(string filename, int inMemLimit)
{
using var fs = new FileStream(filename, FileMode.Open, FileAccess.Read);
- ReadFromStream(fs);
+ ReadFromStream(fs, inMemLimit);
}
public BinaryDataContext(byte[] buffer)
@@ -35,21 +35,21 @@ public BinaryDataContext(byte[] buffer)
_buffer = buffer ?? throw new ArgumentNullException(nameof(buffer));
}
- public BinaryDataContext(Stream stream)
+ public BinaryDataContext(Stream stream, int inMemLimit)
{
long pos = 0;
- ReadFromStream(stream);
+ ReadFromStream(stream, inMemLimit);
stream.Position = pos;
}
-
+
///
/// Признак хранения данных в памяти
///
public bool InMemory => _backingFile == null;
- private void ReadFromStream(Stream stream)
+ private void ReadFromStream(Stream stream, int inMemLimit)
{
- if (stream.Length < FileBackingConstants.DEFAULT_MEMORY_LIMIT)
+ if (stream.Length < inMemLimit)
{
LoadToBuffer(stream);
}
@@ -197,9 +197,9 @@ public GenericStream OpenStreamForRead()
}
[ScriptConstructor(Name = "На основании файла")]
- public static BinaryDataContext Constructor(string filename)
+ public static BinaryDataContext Constructor(TypeActivationContext ctx, string filename)
{
- return new BinaryDataContext(filename);
+ return new BinaryDataContext(filename, ctx.Services.Resolve().MaxBytesInMemory);
}
public override bool Equals(BslValue other)
diff --git a/src/OneScript.StandardLibrary/Binary/BinaryDataOptions.cs b/src/OneScript.StandardLibrary/Binary/BinaryDataOptions.cs
new file mode 100644
index 000000000..d5f84438f
--- /dev/null
+++ b/src/OneScript.StandardLibrary/Binary/BinaryDataOptions.cs
@@ -0,0 +1,101 @@
+// /*----------------------------------------------------------
+// This Source Code Form is subject to the terms of the
+// Mozilla Public License, v.2.0. If a copy of the MPL
+// was not distributed with this file, You can obtain one
+// at http://mozilla.org/MPL/2.0/.
+// ----------------------------------------------------------*/
+
+using System.Globalization;
+using ScriptEngine;
+using ScriptEngine.Hosting;
+
+namespace OneScript.StandardLibrary.Binary
+{
+ ///
+ /// Инкапсулирует логику чтения и хранения настроек двоичных данных
+ ///
+ public class BinaryDataOptions : IBinaryDataMemoryLimit
+ {
+ public const string IN_MEMORY_LIMIT_KEY_NAME = "binaryData.inMemoryMaxSize";
+ public const string IN_MEMORY_MAX_MAGIC = "max";
+
+ public BinaryDataOptions(KeyValueConfig config)
+ {
+ var configValue = config[IN_MEMORY_LIMIT_KEY_NAME];
+ MaxBytesInMemory = ResolveFromConfigString(configValue);
+ }
+
+ public int MaxBytesInMemory { get; }
+
+ private static int ResolveFromConfigString(string rawValue)
+ {
+ if (string.IsNullOrWhiteSpace(rawValue))
+ return BinaryDataConstants.DEFAULT_IN_MEMORY_LIMIT;
+
+ if (rawValue.Trim() == IN_MEMORY_MAX_MAGIC)
+ return BinaryDataConstants.SYSTEM_IN_MEMORY_LIMIT;
+
+ if (!TryParseByteSize(rawValue.Trim(), out var bytes))
+ {
+ SystemLogger.Write($"Invalid value for {IN_MEMORY_LIMIT_KEY_NAME}: {rawValue}");
+ return BinaryDataConstants.DEFAULT_IN_MEMORY_LIMIT;
+ }
+
+ if (bytes <= 0 || bytes >= BinaryDataConstants.SYSTEM_IN_MEMORY_LIMIT)
+ {
+ SystemLogger.Write($"Value for {IN_MEMORY_LIMIT_KEY_NAME} must be between 1 and {BinaryDataConstants.SYSTEM_IN_MEMORY_LIMIT - 1}: {bytes}");
+ return BinaryDataConstants.DEFAULT_IN_MEMORY_LIMIT;
+ }
+
+ return (int)bytes;
+ }
+
+ private static bool TryParseByteSize(string value, out long bytes)
+ {
+ bytes = 0;
+
+ if (value.Length == 0)
+ return false;
+
+ var suffix = value[value.Length - 1];
+ long multiplier = 1;
+ var numberPart = value;
+
+ const long KILOBYTES = 1024L;
+ const long MEGABYTES = KILOBYTES * 1024L;
+ const long GIGABYTES = MEGABYTES * 1024L;
+
+ switch (suffix)
+ {
+ case 'k':
+ case 'K':
+ multiplier = KILOBYTES;
+ numberPart = value.Substring(0, value.Length - 1).TrimEnd();
+ break;
+ case 'm':
+ case 'M':
+ multiplier = MEGABYTES;
+ numberPart = value.Substring(0, value.Length - 1).TrimEnd();
+ break;
+ case 'g':
+ case 'G':
+ multiplier = GIGABYTES;
+ numberPart = value.Substring(0, value.Length - 1).TrimEnd();
+ break;
+ }
+
+ if (numberPart.Length == 0)
+ return false;
+
+ if (!long.TryParse(numberPart, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, CultureInfo.InvariantCulture, out var number))
+ return false;
+
+ if (number <= 0)
+ return false;
+
+ bytes = number * multiplier;
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/OneScript.StandardLibrary/Binary/FileBackingConstants.cs b/src/OneScript.StandardLibrary/Binary/FileBackingConstants.cs
deleted file mode 100644
index eeb073ad9..000000000
--- a/src/OneScript.StandardLibrary/Binary/FileBackingConstants.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-/*----------------------------------------------------------
-This Source Code Form is subject to the terms of the
-Mozilla Public License, v.2.0. If a copy of the MPL
-was not distributed with this file, You can obtain one
-at http://mozilla.org/MPL/2.0/.
-----------------------------------------------------------*/
-
-using System;
-
-namespace OneScript.StandardLibrary.Binary
-{
- public static class FileBackingConstants
- {
- public const int DEFAULT_MEMORY_LIMIT = 1024 * 1024 * 50; // 50 Mb
- public const int SYSTEM_IN_MEMORY_LIMIT = Int32.MaxValue;
- }
-}
\ No newline at end of file
diff --git a/src/OneScript.StandardLibrary/Binary/FileBackingStream.cs b/src/OneScript.StandardLibrary/Binary/FileBackingStream.cs
index 7a0502643..c0a381c5a 100644
--- a/src/OneScript.StandardLibrary/Binary/FileBackingStream.cs
+++ b/src/OneScript.StandardLibrary/Binary/FileBackingStream.cs
@@ -20,13 +20,9 @@ public sealed class FileBackingStream : Stream
private string _backingFileName;
- public FileBackingStream() : this(FileBackingConstants.DEFAULT_MEMORY_LIMIT)
- {
- }
-
public FileBackingStream(int inMemoryLimit, int capacity = 0)
{
- if (inMemoryLimit == FileBackingConstants.SYSTEM_IN_MEMORY_LIMIT)
+ if (inMemoryLimit == BinaryDataConstants.SYSTEM_IN_MEMORY_LIMIT)
throw new ArgumentException("Use MemoryStream instead");
_inMemoryLimit = inMemoryLimit;
@@ -85,6 +81,7 @@ public override long Position
public bool HasBackingFile => _backingFileName != null;
public string FileName => _backingFileName;
+ public int InMemoryThreshold => _inMemoryLimit;
public void SwitchToMemory()
{
diff --git a/src/OneScript.StandardLibrary/Binary/GlobalBinaryData.cs b/src/OneScript.StandardLibrary/Binary/GlobalBinaryData.cs
index f5f34141a..7bc79fc20 100644
--- a/src/OneScript.StandardLibrary/Binary/GlobalBinaryData.cs
+++ b/src/OneScript.StandardLibrary/Binary/GlobalBinaryData.cs
@@ -11,6 +11,7 @@ This Source Code Form is subject to the terms of the
using System.Text;
using OneScript.Contexts;
using OneScript.Exceptions;
+using OneScript.Types;
using ScriptEngine.Machine;
using ScriptEngine.Machine.Contexts;
namespace OneScript.StandardLibrary.Binary
@@ -21,6 +22,13 @@ namespace OneScript.StandardLibrary.Binary
[GlobalContext(Category = "Процедуры и функции работы с двоичными данными")]
public sealed class GlobalBinaryData : GlobalContextBase
{
+ private readonly int _memoryLimitMaxBytesInMemory;
+
+ private GlobalBinaryData(int memoryLimitMaxBytesInMemory)
+ {
+ _memoryLimitMaxBytesInMemory = memoryLimitMaxBytesInMemory;
+ }
+
private static byte[] HexStringToByteArray(string hex)
{
var newHex = System.Text.RegularExpressions.Regex.Replace(hex, @"[^0-9A-Fa-f]", "");
@@ -142,9 +150,9 @@ private static void CheckAndThrowIfNull(AutoContext obj, int argNumber, st
throw RuntimeException.InvalidArgumentType(argNumber, argName);
}
- public static IAttachableContext CreateInstance()
+ public static IAttachableContext CreateInstance(IBinaryDataMemoryLimit memoryLimit)
{
- return new GlobalBinaryData();
+ return new GlobalBinaryData(memoryLimit.MaxBytesInMemory);
}
///
@@ -174,7 +182,7 @@ public BinaryDataContext ConcatBinaryData(ArrayImpl array)
}
stream.Position = 0;
- return new BinaryDataContext(stream);
+ return new BinaryDataContext(stream, _memoryLimitMaxBytesInMemory);
}
///
@@ -244,7 +252,7 @@ public BinaryDataContext GetBinaryDataFromString(string str, IValue encoding = n
stream.Write(inputString, 0, inputString.Length);
stream.Position = 0;
- return new BinaryDataContext(stream);
+ return new BinaryDataContext(stream, _memoryLimitMaxBytesInMemory);
}
///
diff --git a/src/OneScript.StandardLibrary/Binary/IBinaryDataMemoryLimit.cs b/src/OneScript.StandardLibrary/Binary/IBinaryDataMemoryLimit.cs
new file mode 100644
index 000000000..49497dd78
--- /dev/null
+++ b/src/OneScript.StandardLibrary/Binary/IBinaryDataMemoryLimit.cs
@@ -0,0 +1,18 @@
+/*----------------------------------------------------------
+This Source Code Form is subject to the terms of the
+Mozilla Public License, v.2.0. If a copy of the MPL
+was not distributed with this file, You can obtain one
+at http://mozilla.org/MPL/2.0/.
+----------------------------------------------------------*/
+
+namespace OneScript.StandardLibrary.Binary
+{
+ ///
+ /// Лимит объёма данных в памяти для объектов «ДвоичныеДанные» и смежных потоков
+ /// до выгрузки во временный файл (байты).
+ ///
+ public interface IBinaryDataMemoryLimit
+ {
+ int MaxBytesInMemory { get; }
+ }
+}
diff --git a/src/OneScript.StandardLibrary/EngineBuilderExtensions.cs b/src/OneScript.StandardLibrary/EngineBuilderExtensions.cs
index d38e2fbb6..6e3a9875a 100644
--- a/src/OneScript.StandardLibrary/EngineBuilderExtensions.cs
+++ b/src/OneScript.StandardLibrary/EngineBuilderExtensions.cs
@@ -5,6 +5,7 @@ This Source Code Form is subject to the terms of the
at http://mozilla.org/MPL/2.0/.
----------------------------------------------------------*/
+using OneScript.StandardLibrary.Binary;
using OneScript.StandardLibrary.Collections;
using ScriptEngine.Hosting;
using ScriptEngine.Machine;
@@ -13,9 +14,15 @@ namespace OneScript.StandardLibrary
{
public static class EngineBuilderExtensions
{
+ public static IEngineBuilder UseBinaryDataOptions(this IEngineBuilder builder)
+ {
+ builder.Services.RegisterSingleton();
+ return builder;
+ }
+
public static ExecutionContext AddStandardLibrary(this ExecutionContext env)
{
return env.AddAssembly(typeof(ArrayImpl).Assembly);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/OneScript.StandardLibrary/Http/HttpRequestBodyBinary.cs b/src/OneScript.StandardLibrary/Http/HttpRequestBodyBinary.cs
index 0057e2b79..83871f37e 100644
--- a/src/OneScript.StandardLibrary/Http/HttpRequestBodyBinary.cs
+++ b/src/OneScript.StandardLibrary/Http/HttpRequestBodyBinary.cs
@@ -17,42 +17,19 @@ namespace OneScript.StandardLibrary.Http
{
class HttpRequestBodyBinary : IHttpRequestBody
{
- private readonly FileBackingStream _storage = new FileBackingStream();
+ private readonly FileBackingStream _storage;
- public HttpRequestBodyBinary()
+ internal HttpRequestBodyBinary(int inMemoryBodyLimit)
{
+ _storage = new FileBackingStream(inMemoryBodyLimit);
}
- public HttpRequestBodyBinary(BinaryDataContext data)
+ internal HttpRequestBodyBinary(int inMemoryBodyLimit, BinaryDataContext data)
{
+ _storage = new FileBackingStream(inMemoryBodyLimit);
data.CopyTo(_storage);
}
- public HttpRequestBodyBinary(string body, IValue encoding = null,
- ByteOrderMarkUsageEnum bomUsage = ByteOrderMarkUsageEnum.Auto)
- {
- var useBom = bomUsage == ByteOrderMarkUsageEnum.Auto ||
- bomUsage == ByteOrderMarkUsageEnum.Use;
-
- Encoding encoder;
- if (encoding == null)
- {
- encoder = new UTF8Encoding(useBom);
- }
- else if (encoding.SystemType == BasicTypes.String)
- {
- var utfs = new List {"utf-16", "utf-32"};
- encoder = TextEncodingEnum.GetEncoding(encoding, utfs.Contains(encoding.ToString()) && useBom);
- }
- else
- {
- encoder = TextEncodingEnum.GetEncoding(encoding);
- }
-
- var byteArray = encoder.GetBytes(body);
- _storage.Write(byteArray, 0, byteArray.Length);
- }
-
public IValue GetAsString()
{
_storage.Seek(0, SeekOrigin.Begin);
@@ -63,7 +40,7 @@ public IValue GetAsString()
public IValue GetAsBinary()
{
_storage.Seek(0, SeekOrigin.Begin);
- return new BinaryDataContext(_storage);
+ return new BinaryDataContext(_storage, _storage.InMemoryThreshold);
}
public IValue GetAsFilename()
diff --git a/src/OneScript.StandardLibrary/Http/HttpRequestContext.cs b/src/OneScript.StandardLibrary/Http/HttpRequestContext.cs
index d28946b1a..aa77d4001 100644
--- a/src/OneScript.StandardLibrary/Http/HttpRequestContext.cs
+++ b/src/OneScript.StandardLibrary/Http/HttpRequestContext.cs
@@ -6,12 +6,15 @@ This Source Code Form is subject to the terms of the
----------------------------------------------------------*/
using System;
+using System.Collections.Generic;
using System.IO;
+using System.Text;
using OneScript.Contexts;
using OneScript.Exceptions;
using OneScript.StandardLibrary.Binary;
using OneScript.StandardLibrary.Collections;
using OneScript.StandardLibrary.Text;
+using OneScript.Types;
using ScriptEngine.Machine;
using ScriptEngine.Machine.Contexts;
@@ -23,10 +26,12 @@ namespace OneScript.StandardLibrary.Http
[ContextClass("HTTPЗапрос", "HTTPRequest")]
public class HttpRequestContext : AutoContext, IDisposable
{
+ private readonly int _inMemoryBodyLimit;
private IHttpRequestBody _body;
- private HttpRequestContext()
+ private HttpRequestContext(int inMemoryBodyLimit)
{
+ _inMemoryBodyLimit = inMemoryBodyLimit;
ResourceAddress = "";
Headers = new MapImpl();
}
@@ -80,7 +85,7 @@ public IValue GetBodyFileName()
[ContextMethod("УстановитьТелоИзДвоичныхДанных", "SetBodyFromBinaryData")]
public void SetBodyFromBinary(BinaryDataContext data)
{
- SetBody(new HttpRequestBodyBinary(data));
+ SetBody(new HttpRequestBodyBinary(_inMemoryBodyLimit, data));
}
[DeprecatedName("GetBodyAsBinary")]
@@ -99,7 +104,27 @@ public IValue GetBodyFromBinary()
[ContextMethod("УстановитьТелоИзСтроки", "SetBodyFromString")]
public void SetBodyFromString(string data, IValue encoding = null, ByteOrderMarkUsageEnum bomUsage = ByteOrderMarkUsageEnum.Auto)
{
- SetBody(new HttpRequestBodyBinary(data, encoding, bomUsage));
+ var useBom = bomUsage == ByteOrderMarkUsageEnum.Auto ||
+ bomUsage == ByteOrderMarkUsageEnum.Use;
+
+ Encoding encoder;
+ if (encoding == null)
+ {
+ encoder = new UTF8Encoding(useBom);
+ }
+ else if (encoding.SystemType == BasicTypes.String)
+ {
+ var utfs = new List {"utf-16", "utf-32"};
+ encoder = TextEncodingEnum.GetEncoding(encoding, utfs.Contains(encoding.ToString()) && useBom);
+ }
+ else
+ {
+ encoder = TextEncodingEnum.GetEncoding(encoding);
+ }
+
+ var byteArray = encoder.GetBytes(data);
+
+ SetBody(new HttpRequestBodyBinary(_inMemoryBodyLimit, new BinaryDataContext(byteArray)));
}
[ContextMethod("ПолучитьТелоКакСтроку", "GetBodyAsString")]
@@ -111,20 +136,24 @@ public IValue GetBodyAsString()
[ContextMethod("ПолучитьТелоКакПоток", "GetBodyAsStream")]
public GenericStream GetBodyAsStream()
{
- _body = _body ?? new HttpRequestBodyBinary();
+ _body ??= new HttpRequestBodyBinary(_inMemoryBodyLimit);
return new GenericStream(_body.GetDataStream());
}
[ScriptConstructor(Name = "Формирование неинициализированного объекта")]
- public static HttpRequestContext Constructor()
+ public static HttpRequestContext Constructor(TypeActivationContext context)
{
- return new HttpRequestContext();
+ return new HttpRequestContext(context.Services.Resolve().MaxBytesInMemory);
}
[ScriptConstructor(Name = "По адресу ресурса и заголовкам")]
- public static HttpRequestContext Constructor(string resource, IValue headers = null)
+ public static HttpRequestContext Constructor(TypeActivationContext context, string resource, IValue headers = null)
{
- var ctx = new HttpRequestContext {ResourceAddress = resource};
+ var ctx = new HttpRequestContext(context.Services.Resolve().MaxBytesInMemory)
+ {
+ ResourceAddress = resource
+ };
+
if (headers == null)
return ctx;
diff --git a/src/ScriptEngine.HostedScript/DefaultTemplatesFactory.cs b/src/ScriptEngine.HostedScript/DefaultTemplatesFactory.cs
index d852af168..00150a124 100644
--- a/src/ScriptEngine.HostedScript/DefaultTemplatesFactory.cs
+++ b/src/ScriptEngine.HostedScript/DefaultTemplatesFactory.cs
@@ -5,13 +5,22 @@ This Source Code Form is subject to the terms of the
at http://mozilla.org/MPL/2.0/.
----------------------------------------------------------*/
+using OneScript.StandardLibrary.Binary;
+
namespace ScriptEngine.HostedScript
{
public class DefaultTemplatesFactory : ITemplateFactory
{
+ private readonly int _inMemLimit;
+
+ public DefaultTemplatesFactory(IBinaryDataMemoryLimit memoryLimit)
+ {
+ _inMemLimit = memoryLimit.MaxBytesInMemory;
+ }
+
public ITemplate CreateTemplate(string file, TemplateKind kind)
{
- return new FileSourceTemplate(file, kind);
+ return new FileSourceTemplate(_inMemLimit, file, kind);
}
}
}
\ No newline at end of file
diff --git a/src/ScriptEngine.HostedScript/Extensions/EngineBuilderExtensions.cs b/src/ScriptEngine.HostedScript/Extensions/EngineBuilderExtensions.cs
index 185612566..25c7c89b9 100644
--- a/src/ScriptEngine.HostedScript/Extensions/EngineBuilderExtensions.cs
+++ b/src/ScriptEngine.HostedScript/Extensions/EngineBuilderExtensions.cs
@@ -9,6 +9,7 @@ This Source Code Form is subject to the terms of the
using System.IO;
using OneScript.Contexts;
using OneScript.Native.Extensions;
+using OneScript.StandardLibrary;
using ScriptEngine.Hosting;
using ScriptEngine.Machine;
@@ -64,6 +65,12 @@ public static ConfigurationProviders UseEnvironmentVariableConfig(this Configura
providers.Add(reader);
return providers;
}
+
+ public static IEngineBuilder UseDefaultHosting(this IEngineBuilder b)
+ {
+ return b.UseFileSystemLibraries()
+ .UseBinaryDataOptions();
+ }
public static IEngineBuilder UseFileSystemLibraries(this IEngineBuilder b)
{
diff --git a/src/ScriptEngine.HostedScript/FileSourceTemplate.cs b/src/ScriptEngine.HostedScript/FileSourceTemplate.cs
index 991c4c57d..176c2b415 100644
--- a/src/ScriptEngine.HostedScript/FileSourceTemplate.cs
+++ b/src/ScriptEngine.HostedScript/FileSourceTemplate.cs
@@ -11,8 +11,11 @@ namespace ScriptEngine.HostedScript
{
public class FileSourceTemplate : ITemplate
{
- public FileSourceTemplate(string file, TemplateKind kind)
+ private readonly int _inMemLimit;
+
+ public FileSourceTemplate(int inMemLimit, string file, TemplateKind kind)
{
+ _inMemLimit = inMemLimit;
Kind = kind;
Filename = file;
}
@@ -28,7 +31,7 @@ public string GetFilename()
public BinaryDataContext GetBinaryData()
{
- return new BinaryDataContext(Filename);
+ return new BinaryDataContext(Filename, _inMemLimit);
}
public void Dispose()
diff --git a/src/ScriptEngine.HostedScript/ScriptEngine.HostedScript.csproj b/src/ScriptEngine.HostedScript/ScriptEngine.HostedScript.csproj
index 4d5769efc..78adeb5c7 100644
--- a/src/ScriptEngine.HostedScript/ScriptEngine.HostedScript.csproj
+++ b/src/ScriptEngine.HostedScript/ScriptEngine.HostedScript.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/ScriptEngine.HostedScript/oscript.cfg b/src/ScriptEngine.HostedScript/oscript.cfg
index 1ddb2504f..524057f8c 100644
--- a/src/ScriptEngine.HostedScript/oscript.cfg
+++ b/src/ScriptEngine.HostedScript/oscript.cfg
@@ -19,4 +19,9 @@ lib.system = ../lib
#encoding.script=utf-8
-#systemlanguage = ru
\ No newline at end of file
+#systemlanguage = ru
+
+# Порог: пока размер двоичных данных в памяти не превышает это значение, данные держатся в RAM;
+# при большем размере используется временный файл. По умолчанию 50m (52428800 байт).
+# Значение — целое число байт или с суффиксом k, m, g (512k, 50m, 1g).
+#binaryData.inMemoryMaxSize=50m
diff --git a/src/ScriptEngine/BslProcess.cs b/src/ScriptEngine/BslProcess.cs
index 65b8c9de2..0ef93b311 100644
--- a/src/ScriptEngine/BslProcess.cs
+++ b/src/ScriptEngine/BslProcess.cs
@@ -1,7 +1,6 @@
/*----------------------------------------------------------
This Source Code Form is subject to the terms of the
-Mozilla Public License, v.2.0. If a copy of the MPL
-was not distributed with this file, You can obtain one
+Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one
at http://mozilla.org/MPL/2.0/.
----------------------------------------------------------*/
@@ -40,25 +39,42 @@ public BslProcess(int id, ExecutionContext context, IEnumerable e.BeforeProcessStart(this));
- }
-
- _isRunning = true;
+ List startedExecutors = null;
try
{
+ if (notifyExecutors)
+ {
+ startedExecutors = new List(_executorProviders.Length);
+ foreach (var executor in _executorProviders)
+ {
+ executor.BeforeProcessStart(this);
+ startedExecutors.Add(executor);
+ }
+ }
+
+ _isRunning = true;
+
return _bslExecutorsByModule[module.GetType()](this, target, module, method, arguments);
}
finally
{
if (notifyExecutors)
{
- Array.ForEach(_executorProviders, e => e.AfterProcessExit(this));
- _isRunning = false;
+ try
+ {
+ if (startedExecutors != null)
+ {
+ for (var i = startedExecutors.Count - 1; i >= 0; i--)
+ startedExecutors[i].AfterProcessExit(this);
+ }
+ }
+ finally
+ {
+ _isRunning = false;
+ }
}
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/ScriptEngine/Hosting/EngineBuilderExtensions.cs b/src/ScriptEngine/Hosting/EngineBuilderExtensions.cs
index 37225644d..70f0a0324 100644
--- a/src/ScriptEngine/Hosting/EngineBuilderExtensions.cs
+++ b/src/ScriptEngine/Hosting/EngineBuilderExtensions.cs
@@ -79,7 +79,7 @@ public static IEngineBuilder SetDefaultOptions(this IEngineBuilder builder)
var holder = sp.Resolve();
return holder.GetConfig();
});
-
+
services.Register();
return builder;
diff --git a/src/TestApp/MainWindow.xaml.cs b/src/TestApp/MainWindow.xaml.cs
index 5c2adc40c..320401b17 100644
--- a/src/TestApp/MainWindow.xaml.cs
+++ b/src/TestApp/MainWindow.xaml.cs
@@ -139,6 +139,7 @@ private HostedScriptEngine CreateEngine()
.SetDefaultOptions()
.UseNativeRuntime()
.UseImports()
+ .UseDefaultHosting()
.SetupEnvironment(e =>
{
e.AddStandardLibrary();
@@ -149,8 +150,7 @@ private HostedScriptEngine CreateEngine()
x.UseSystemConfigFile()
.UseEntrypointConfigFile(_currentDocPath);
});
-
- builder.UseFileSystemLibraries();
+
var engine = builder.Build();
var mainEngine = new HostedScriptEngine(engine);
diff --git a/src/Tests/OneScript.StandardLibrary.Tests/BinaryDataMemoryLimitConfigurationTests.cs b/src/Tests/OneScript.StandardLibrary.Tests/BinaryDataMemoryLimitConfigurationTests.cs
new file mode 100644
index 000000000..18229c890
--- /dev/null
+++ b/src/Tests/OneScript.StandardLibrary.Tests/BinaryDataMemoryLimitConfigurationTests.cs
@@ -0,0 +1,90 @@
+/*----------------------------------------------------------
+This Source Code Form is subject to the terms of the
+Mozilla Public License, v.2.0. If a copy of the MPL
+was not distributed with this file, You can obtain one
+at http://mozilla.org/MPL/2.0/.
+----------------------------------------------------------*/
+
+using System.Collections.Generic;
+using FluentAssertions;
+using Moq;
+using OneScript.StandardLibrary.Binary;
+using ScriptEngine;
+using ScriptEngine.Hosting;
+using Xunit;
+
+namespace OneScript.StandardLibrary.Tests
+{
+ [Collection("SystemLogger")]
+ public class BinaryDataMemoryLimitConfigurationTests
+ {
+ List _messages = new List();
+
+ public BinaryDataMemoryLimitConfigurationTests()
+ {
+ var mock = new Mock();
+ mock.Setup(x => x.Write(It.IsAny()))
+ .Callback(str => _messages.Add(str));
+
+ SystemLogger.SetWriter(mock.Object);
+ }
+
+ [Theory]
+ [InlineData("52428800", 52428800)]
+ [InlineData("512k", 512 * 1024)]
+ [InlineData("512K", 512 * 1024)]
+ [InlineData("50m", 50 * 1024 * 1024)]
+ [InlineData("50M", 50 * 1024 * 1024)]
+ [InlineData("1g", 1024 * 1024 * 1024)]
+ [InlineData("1G", 1024 * 1024 * 1024)]
+ public void ResolvesByteSizeWithOptionalSuffix(string rawValue, int expectedBytes)
+ {
+ var bytes = MockConfig(rawValue).MaxBytesInMemory;
+
+ bytes.Should().Be(expectedBytes);
+ _messages.Should().BeEmpty();
+ }
+
+ private static IBinaryDataMemoryLimit MockConfig(string rawValue)
+ {
+ var kvStore = new KeyValueConfig();
+ kvStore.Merge(new Dictionary
+ {
+ {BinaryDataOptions.IN_MEMORY_LIMIT_KEY_NAME, rawValue}
+ }, Mock.Of());
+
+ return new BinaryDataOptions(kvStore);
+ }
+
+ [Theory]
+ [InlineData(null)]
+ [InlineData("")]
+ [InlineData(" ")]
+ public void UsesDefaultWhenValueIsMissing(string rawValue)
+ {
+ var bytes = MockConfig(rawValue).MaxBytesInMemory;
+
+ bytes.Should().Be(BinaryDataConstants.DEFAULT_IN_MEMORY_LIMIT);
+ }
+
+ [Theory]
+ [InlineData("512x")]
+ [InlineData("m512")]
+ [InlineData("0")]
+ [InlineData("-1")]
+ [InlineData("2g")]
+ public void UsesDefaultForInvalidValue(string rawValue)
+ {
+ var bytes = MockConfig(rawValue).MaxBytesInMemory;
+
+ bytes.Should().Be(BinaryDataConstants.DEFAULT_IN_MEMORY_LIMIT);
+ _messages.Should().NotBeEmpty();
+ }
+
+ [Fact]
+ public void TestMagicMaxValue()
+ {
+ MockConfig(BinaryDataOptions.IN_MEMORY_MAX_MAGIC).MaxBytesInMemory.Should().Be(BinaryDataConstants.SYSTEM_IN_MEMORY_LIMIT);
+ }
+ }
+}
diff --git a/src/oscript/CgiBehavior.cs b/src/oscript/CgiBehavior.cs
index 911782454..3354a0597 100644
--- a/src/oscript/CgiBehavior.cs
+++ b/src/oscript/CgiBehavior.cs
@@ -13,8 +13,10 @@ This Source Code Form is subject to the terms of the
using OneScript.Exceptions;
using OneScript.Execution;
using OneScript.StandardLibrary;
+using OneScript.StandardLibrary.Binary;
using oscript.Web;
+using ScriptEngine;
using ScriptEngine.HostedScript;
using ScriptEngine.Hosting;
using ScriptEngine.Machine;
@@ -67,8 +69,8 @@ private int RunCGIMode(string scriptFile)
});
var engine = ConsoleHostBuilder.Build(builder);
-
- var request = new WebRequestContext();
+
+ var request = new WebRequestContext(engine.Services.Resolve().MaxBytesInMemory);
engine.InjectGlobalProperty("ВебЗапрос", "WebRequest", request, true);
engine.InjectObject(this);
diff --git a/src/oscript/ConsoleHostBuilder.cs b/src/oscript/ConsoleHostBuilder.cs
index 675179567..031fc29e8 100644
--- a/src/oscript/ConsoleHostBuilder.cs
+++ b/src/oscript/ConsoleHostBuilder.cs
@@ -6,6 +6,7 @@ This Source Code Form is subject to the terms of the
----------------------------------------------------------*/
using OneScript.StandardLibrary;
+using OneScript.StandardLibrary.Binary;
using ScriptEngine.HostedScript;
using ScriptEngine.Hosting;
using ScriptEngine.HostedScript.Extensions;
@@ -31,7 +32,7 @@ public static IEngineBuilder Create(string codePath)
{
env.AddStandardLibrary()
.AddWebServer()
- .UseTemplateFactory(new DefaultTemplatesFactory());
+ .UseTemplateFactory(new DefaultTemplatesFactory(env.Services.Resolve()));
});
return builder;
@@ -49,7 +50,7 @@ private static void BuildUpWithIoC(IEngineBuilder builder)
{
builder.SetDefaultOptions()
.UseImports()
- .UseFileSystemLibraries()
+ .UseDefaultHosting()
.UseNativeRuntime()
.UseEventHandlers();
}
diff --git a/src/oscript/Web/WebRequestContext.cs b/src/oscript/Web/WebRequestContext.cs
index 30f46d52c..88c17de14 100644
--- a/src/oscript/Web/WebRequestContext.cs
+++ b/src/oscript/Web/WebRequestContext.cs
@@ -15,6 +15,7 @@ This Source Code Form is subject to the terms of the
using OneScript.StandardLibrary.Collections;
using OneScript.StandardLibrary.Text;
using oscript.Web.Multipart;
+using ScriptEngine;
using ScriptEngine.Machine;
using ScriptEngine.Machine.Contexts;
@@ -27,8 +28,14 @@ public sealed class WebRequestContext : AutoContext, IDisposa
private FileBackingStream _postBody;
- public WebRequestContext()
+ private readonly int _postBodyInMemoryMaxBytes;
+
+ public WebRequestContext(int postBodyInMemoryMaxBytes)
{
+ if (postBodyInMemoryMaxBytes <= 0 || postBodyInMemoryMaxBytes == int.MaxValue)
+ throw new ArgumentOutOfRangeException(nameof(postBodyInMemoryMaxBytes),
+ "Лимит памяти для тела POST-запроса должен быть положительным числом байт и меньше Int32.MaxValue.");
+ _postBodyInMemoryMaxBytes = postBodyInMemoryMaxBytes;
var get = Environment.GetEnvironmentVariable("QUERY_STRING");
if (get != null) FillGetMap(get);
@@ -68,7 +75,8 @@ private void ProcessPostData()
var type = Environment.GetEnvironmentVariable("CONTENT_TYPE");
using var stdin = Console.OpenStandardInput();
- var dest = new FileBackingStream(FileBackingConstants.DEFAULT_MEMORY_LIMIT, len);
+ var initialCapacity = Math.Min(len, _postBodyInMemoryMaxBytes);
+ var dest = new FileBackingStream(_postBodyInMemoryMaxBytes, initialCapacity);
stdin.CopyTo(dest);
dest.Position = 0;
@@ -107,7 +115,7 @@ private void FillGetMap(string get)
public BinaryDataContext GetBodyAsBinaryData()
{
_postBody.Position = 0;
- return new BinaryDataContext(_postBody);
+ return new BinaryDataContext(_postBody, _postBodyInMemoryMaxBytes);
}
[ContextMethod("ПолучитьТелоКакСтроку", "GetBodyAsString")]