private IEnumerable <System.Reflection.Assembly> GetAssembly() { var assemblies = new List <System.Reflection.Assembly>(); BaseDirectory.Create(); if (BaseDirectory.Exists()) { var files = BaseDirectory.GetFiles("*.dll"); foreach (var file in files) { assemblies.Add(CustomAssembly.LoadFile(file.FullName)); } return(assemblies); } else { throw new DirectoryException($"BaseDirectory from path \"{BaseDirectory}\" is not exist"); } }