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); }
public void LoadPreset(LibraryPathType aType) { ValidateModel(); ILibraryPathsProvider vProvider = LibraryPathsProviderFactory.CreateProvider(aType); Model.LibraryPaths = vProvider.List(); Model.NotifyObservers(); }
public static bool IsProviderSupported(LibraryPathType iLibraryType) { try { ILibraryPathsProvider vProvider = LibraryPathsProviderFactory.CreateProvider(iLibraryType); return(vProvider != null); } catch (NotSupportedException) { return(false); } }