Пример #1
0
        public Assembly GetAssembly(bool useMetadataLoadContext)
        {
            Assembly loadedAssemly = null;

            if (useMetadataLoadContext)
            {
                if (!string.IsNullOrWhiteSpace(AssemblyToReflectFilePath))
                {
                    loadedAssemly = MetaCtx.LoadFromAssemblyPath(AssemblyToReflectFilePath);
                }
                else
                {
                    UtilLogger.LogInfo(MetaCtx.ToString());
                }
            }
            else
            {
                loadedAssemly = Assembly.LoadFrom(AssemblyToReflectFilePath);
            }

            return(loadedAssemly);
        }
Пример #2
0
 public ReflectionService()
 {
     UtilLogger.LogInfo(MessageImportance.Low, MetaCtx.ToString());
 }