internal static VolumeItem CreateInstance(VolumeItemType type, VolumeDatabase database) { VolumeItem item = null; switch (type) { case VolumeItemType.DirectoryVolumeItem: item = new DirectoryVolumeItem(database); break; case VolumeItemType.FileVolumeItem: item = new FileVolumeItem(database); break; case VolumeItemType.AudioCdRootVolumeItem: item = new AudioCdRootVolumeItem(database); break; case VolumeItemType.AudioTrackVolumeItem: item = new AudioTrackVolumeItem(database); break; default: throw new NotImplementedException(string.Format("Instantiation of type {0} is not implemented", type.ToString())); } return(item); }
internal static VolumeItem CreateInstance(VolumeItemType type, VolumeDatabase database) { VolumeItem item = null; switch (type) { case VolumeItemType.DirectoryVolumeItem: item = new DirectoryVolumeItem(database); break; case VolumeItemType.FileVolumeItem: item = new FileVolumeItem(database); break; case VolumeItemType.AudioCdRootVolumeItem: item = new AudioCdRootVolumeItem(database); break; case VolumeItemType.AudioTrackVolumeItem: item = new AudioTrackVolumeItem(database); break; default: throw new NotImplementedException(string.Format("Instantiation of type {0} is not implemented", type.ToString())); } return item; }