Beispiel #1
0
        static TypeManager()
        {
            string assemblyLocation;
            var    isBundled = AssemblyHelper.TryInitializeBundledAssemblies();

            Instance = new TypeManager(isBundled);
            if (isBundled)
            {
                foreach (var name in AssemblyHelper.GetBundledAssembliesNames())
                {
                    Instance.ScanFile(name, bundled: true);
                }

                // in case of a bundled version `Assembly.GetExecutingAssembly().Location` returns an empty string
                assemblyLocation = Directory.GetCurrentDirectory();
            }
            else
            {
                assemblyLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            }
            Instance.Scan(assemblyLocation);
        }
Beispiel #2
0
 static TypeManager()
 {
     Instance = new TypeManager();
     Instance.Scan(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
 }