Galen.Ci.EntityFramework.AssemblyLoader.Load C# (CSharp) Method

Load() public method

public Load ( MigrationsSource source, string filePath ) : Assembly
source MigrationsSource
filePath string
return System.Reflection.Assembly
        public Assembly Load(MigrationsSource source, string filePath)
        {
            try
            {
                var assembly = Assembly.LoadFile(filePath);
                var rootPath = Path.GetDirectoryName(filePath);

                if (source == MigrationsSource.Target)
                {
                    m_TargetPath = rootPath;
                }
                else
                {
                    m_DeployedPath = rootPath;
                }
                    
                m_Sources.TryAdd(BuildAssemblyId(assembly), source);
                return assembly;
            }
            catch (Exception ex)
            {
                Log.Error(ex, "Unablet to load assembly from path {filePath}", filePath);
            }

            return null;
        }