コード例 #1
0
        protected void TestCreateProvider(LibraryPathType iLibraryType, Type iExpectedType, string iErrorMsg)
        {
            ILibraryPathsProvider vProvider = LibraryPathsProviderFactory.CreateProvider(iLibraryType);

            Assert.IsNotNull(vProvider, "Provider was not created. " + iErrorMsg);
            Assert.IsInstanceOf(iExpectedType, vProvider, "Created provider is of wrong type. " + iErrorMsg);
        }
コード例 #2
0
        public void LoadPreset(LibraryPathType aType)
        {
            ValidateModel();
            ILibraryPathsProvider vProvider = LibraryPathsProviderFactory.CreateProvider(aType);

            Model.LibraryPaths = vProvider.List();
            Model.NotifyObservers();
        }
コード例 #3
0
 public static bool IsProviderSupported(LibraryPathType iLibraryType)
 {
     try
     {
         ILibraryPathsProvider vProvider = LibraryPathsProviderFactory.CreateProvider(iLibraryType);
         return(vProvider != null);
     }
     catch (NotSupportedException)
     {
         return(false);
     }
 }