Exemple #1
0
 protected virtual void OnLibraryLoaded(LibraryLoadEventArgs e)
 {
     if (this.libraryLoaded == null)
     {
         return;
     }
     this.libraryLoaded((object)this, e);
 }
Exemple #2
0
        public IResourceLibrary LoadLibrary(string dllName)
        {
            string           file = Path.Combine(this.SearchPath, dllName);
            IResourceLibrary resourceLibrary;

            if (!this.libraries.TryGetValue(dllName.ToUpperInvariant(), out resourceLibrary))
            {
                LibraryLoadEventArgs e = new LibraryLoadEventArgs(dllName);
                e.Mode = this.mode;
                this.OnLibraryLoading(e);
                resourceLibrary = (IResourceLibrary) new MediaCenterUnmanagedLibrary(file, e.Mode);
                this.libraries[dllName.ToUpperInvariant()] = resourceLibrary;
                this.OnLibraryLoaded(e);
            }
            return(resourceLibrary);
        }
 protected virtual void OnLibraryLoading(LibraryLoadEventArgs e)
 {
     if (this.libraryLoading == null)
         return;
     this.libraryLoading((object)this, e);
 }
 public IResourceLibrary LoadLibrary(string dllName)
 {
     string file = Path.Combine(this.SearchPath, dllName);
     IResourceLibrary resourceLibrary;
     if (!this.libraries.TryGetValue(dllName.ToUpperInvariant(), out resourceLibrary))
     {
         LibraryLoadEventArgs e = new LibraryLoadEventArgs(dllName);
         e.Mode = this.mode;
         this.OnLibraryLoading(e);
         resourceLibrary = (IResourceLibrary)new MediaCenterUnmanagedLibrary(file, e.Mode);
         this.libraries[dllName.ToUpperInvariant()] = resourceLibrary;
         this.OnLibraryLoaded(e);
     }
     return resourceLibrary;
 }