public void Dispose() { _mediaLocatorService.MediaItemFound -= _mediaLocatorService_MediaItemFound; _mediaLocatorService.MediaItemRemoved -= _mediaLocatorService_MediaItemRemoved; _mediaLocatorService.MediaItemRenamed -= _mediaLocatorService_MediaItemRenamed; _mediaLocatorService.Dispose(); _mediaLocatorService = null; _mediaLocationContext = null; _mediaItemContext = null; }
public MediaCollectionManager(IMediaLocatorService mediaLocatorService, IMediaLocationContext mediaLocationContext, IMediaItemContext mediaItemContext) { _mediaLocationContext = mediaLocationContext; _mediaItemContext = mediaItemContext; _mediaLocatorService = mediaLocatorService; _mediaLocatorService.MediaItemFound += _mediaLocatorService_MediaItemFound; _mediaLocatorService.MediaItemRemoved += _mediaLocatorService_MediaItemRemoved; _mediaLocatorService.MediaItemRenamed += _mediaLocatorService_MediaItemRenamed; }
public static MediaCollection Create( IMediaLocatorService mediaLocatorService_iMediaLocatorService, IMediaLocationContext mediaLocationContext_iMediaLocationContext, IMediaItemContext mediaItemContext_iMediaItemContext ) { MediaCollection mediaCollection = new MediaCollection(mediaLocatorService_iMediaLocatorService, mediaLocationContext_iMediaLocationContext, mediaItemContext_iMediaItemContext); return(mediaCollection); // TODO: Edit factory method of MediaCollection // This method should be able to configure the object in all possible ways. // Add as many parameters as needed, // and assign their values to each field by using the API. }