Пример #1
0
 private bool DependenciesFilled(AssemblyDescription desc)
 {
     var v = from dep in desc.Dependencies
             where FromName(dep.AssemblyName).IsLoaded
             select dep;
     return v.Count() == desc.Dependencies.Count;
 }
Пример #2
0
 private void OnAssemblyLoaded(AssemblyDescription desc)
 {
     var loaded = AssemblyLoaded;
     if (loaded != null)
         loaded(this, new DynamicLoadEventArgs(desc));
     UpdateDependencies();
 }
 public DynamicLoadErrorEventArgs(AssemblyDescription description, Exception error)
     : base(description)
 {
     Error = error;
 }
Пример #4
0
 private void OnLoadError(AssemblyDescription desc, Exception exc)
 {
     if (!desc.IsLoading)
         return;
     desc.IsLoading = false;
     var error = DynamicLoadError;
     if (error != null)
         error(this, new DynamicLoadErrorEventArgs(desc, exc));
     var related = from d in AssemblyDescriptions
                   where d.IsLoading && d.DependsOn(desc.AssemblyName)
                   select d;
     foreach (var d in related)
     {
         OnLoadError(d, exc);
     }
 }
Пример #5
0
 internal DynamicLoadEventArgs(AssemblyDescription description)
 {
     AssemblyDescription = description;
 }