public static void Load()

in csharp/Functions.Dll/FunctionsImport.cs [26:68]


		public static void Load()
		{
			// Also possible to just move ResourceLoader call into this constructor
			if (Const.Verbose)
				Console.WriteLine("Native Init...");

			if (isLoaded)
				return;
			lock (isLoadedLock)
			{
				if (isLoaded)
					return;

				if (Const.Verbose)
					Console.WriteLine("Will load native lib");

				var varMapper = new VariablesMapper(typeof(FunctionsInterfaceImpl));

				var unpackEnvVarName = varMapper.PackageLast.ToUpperInvariant() + "_UNPACK_ROOT";
				var unpackPath = Environment.GetEnvironmentVariable(unpackEnvVarName);
				Console.WriteLine($"Check {unpackEnvVarName} environment variable: {unpackPath ?? "null"}");
				if (unpackPath == null)
					unpackPath = "$(TEMP)/$(PACKAGE)/$(VERSION)/$(ARCH)";

				var rl =
					ResourceLoader.From(typeof(FunctionsInterfaceImpl), $"Functions.{varMapper.Os}.{varMapper.Arch}.*")
						.To(varMapper.Substitute(unpackPath))
						.Load();
				//.To("c:/Users/ChuprinB/Dropbox/Projects/decimal.net/NativeUtils/csharp/Functions/DotNet/$(VERSION)/$(ARCH)").Load();
				//.To("Functions/DotNet/Debug").Load();

				// If we don't want automatic target root path selection and fallback path features:

				//.To("$(TEMP)/Functions/DotNet/$(VERSION)/$(ARCH)")/*.RetryTimeout(2000)*/.Load();
				//.To("$(TEMP)/_/$(RANDOM)").Load();
				//.To("$(TEMP)/_/$(VERSION)/$(ARCH)").AlwaysOverwite(true).ReusePartiallyDeployed(false).TryRandomFallbackSubDirectory(true).Load();

				if (Const.Verbose)
					Console.WriteLine("Loaded native lib at: {0}", rl.ActualDeploymentPath);

				isLoaded = true;
			}
		}