コード例 #1
0
ファイル: TaggedFilePersister.cs プロジェクト: Melamew/LMaML
 /// <summary>
 /// Initializes a new instance of the <see cref="TaggedFilePersister" /> class.
 /// </summary>
 /// <param name="fileAdapter">The file adapter.</param>
 /// <param name="referenceAdapters">The reference adapters.</param>
 /// <param name="configurationManager">The configuration manager.</param>
 public TaggedFilePersister(IDataAdapter <StorableTaggedFile> fileAdapter,
                            IReferenceAdapters referenceAdapters,
                            IConfigurationManager configurationManager)
 {
     fileAdapter.Guard("fileAdapter");
     referenceAdapters.Guard("referenceAdapters");
     configurationManager.Guard("configurationManager");
     this.fileAdapter       = fileAdapter;
     this.referenceAdapters = referenceAdapters;
     maxCacheSize           = configurationManager.GetValue("StorableTaggedFilePersister.MaxCacheItems", 200);
     CreateIndices();
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReferenceAdaptersContainer" /> class.
 /// </summary>
 /// <param name="artistAdapter">The artist adapter.</param>
 /// <param name="albumAdapter">The album adapter.</param>
 /// <param name="genreAdapter">The genre adapter.</param>
 /// <param name="titleAdapter">The title adapter.</param>
 /// <param name="yearAdapter">The year adapter.</param>
 public ReferenceAdaptersContainer(IDataAdapter <Artist> artistAdapter, IDataAdapter <Album> albumAdapter, IDataAdapter <Genre> genreAdapter, IDataAdapter <Title> titleAdapter, IDataAdapter <Year> yearAdapter)
 {
     artistAdapter.Guard("artistAdapter");
     albumAdapter.Guard("albumAdapter");
     genreAdapter.Guard("genreAdapter");
     titleAdapter.Guard("titleAdapter");
     yearAdapter.Guard("yearAdapter");
     YearAdapter   = yearAdapter;
     TitleAdapter  = titleAdapter;
     GenreAdapter  = genreAdapter;
     AlbumAdapter  = albumAdapter;
     ArtistAdapter = artistAdapter;
 }