示例#1
0
文件: Volume.cs 项目: balihb/basenji
        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);
        }
示例#2
0
文件: Volume.cs 项目: pulb/basenji
 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;
 }