Zetbox.API.AssemblyLoader.InitialiseTargetAssemblyFolder C# (CSharp) Method

InitialiseTargetAssemblyFolder() private static method

private static InitialiseTargetAssemblyFolder ( ZetboxConfig config ) : void
config Zetbox.API.Configuration.ZetboxConfig must not be null
return void
        private static void InitialiseTargetAssemblyFolder(ZetboxConfig config)
        {
            EnableShadowCopy = config.EnableShadowCopy;
            if (EnableShadowCopy)
            {
                TargetAssemblyFolder = Path.Combine(config.TempFolder, "bin");
                Directory.CreateDirectory(TargetAssemblyFolder);

                // Delete stale Assemblies
                try
                {
                    Directory.GetFiles(AssemblyLoader.TargetAssemblyFolder).ForEach<string>(f => System.IO.File.Delete(f));
                    Log.InfoFormat("Cleaned TargetAssemblyFolder {0}", AssemblyLoader.TargetAssemblyFolder);
                }
                catch (Exception ex)
                {
                    Log.WarnFormat("Couldn't clean TargetAssemblyFolder {0}: {1}", AssemblyLoader.TargetAssemblyFolder, ex.ToString());
                }
            }
            else
            {
                Log.Info("Shadow copy has been disabled");
            }
        }