internal static Volume CreateInstance(VolumeType type, VolumeDatabase database) { Volume volume = null; switch (type) { case VolumeType.FileSystemVolume: volume = new FileSystemVolume(database); break; case VolumeType.AudioCdVolume: volume = new AudioCdVolume(database); break; default: throw new NotImplementedException(string.Format("Instanciation of type {0} is not implemented", type.ToString())); } return(volume); }
internal static Volume CreateInstance(VolumeType type, VolumeDatabase database) { Volume volume = null; switch (type) { case VolumeType.FileSystemVolume: volume = new FileSystemVolume(database); break; case VolumeType.AudioCdVolume: volume = new AudioCdVolume(database); break; default: throw new NotImplementedException(string.Format("Instanciation of type {0} is not implemented", type.ToString())); } return volume; }