Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Library"/> class.
 /// </summary>
 public Library()
 {
     this.songLocker = new object();
     this.songs = new HashSet<Song>();
     this.playlist = new Playlist();
     this.volume = 1.0f;
     this.AccessMode = AccessMode.Administrator; // We want implicit to be the administrator, till we change to user mode manually
     this.driveNotifier = RemovableDriveNotifier.Create();
     this.driveNotifier.DriveRemoved += (sender, args) => Task.Factory.StartNew(this.Update);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Library"/> class.
 /// </summary>
 public Library()
 {
     this.songLocker    = new object();
     this.songs         = new HashSet <Song>();
     this.playlist      = new Playlist();
     this.volume        = 1.0f;
     this.AccessMode    = AccessMode.Administrator; // We want implicit to be the administrator, till we change to user mode manually
     this.driveNotifier = RemovableDriveNotifier.Create();
     this.driveNotifier.DriveRemoved += (sender, args) => Task.Factory.StartNew(this.Update);
 }