public async Task Initialize(ICamera camera, IStorage storage) { this.camera = camera; this.storage = storage; var cacheFolder = KnownFolders.PicturesLibrary; this.dropFolder = await cacheFolder.GetFolderAsync("securitysystem-cameradrop"); this.dropFolderWatcher = dropFolder.CreateFileQuery(); var images = await this.dropFolderWatcher.GetFilesAsync(); var orderedImages = images.OrderByDescending(x => x.DateCreated); this.newestImage = orderedImages.FirstOrDefault(); this.dropFolderWatcher.ContentsChanged += DropFolderWatcher_ContentsChanged; this.allJoynBusAttachment = new AllJoynBusAttachment(); this.producer = new SecuritySystemProducer(this.allJoynBusAttachment); this.allJoynBusAttachment.AboutData.DefaultAppName = Package.Current.DisplayName; this.allJoynBusAttachment.AboutData.DefaultDescription = Package.Current.Description; this.allJoynBusAttachment.AboutData.DefaultManufacturer = Package.Current.Id.Publisher; this.allJoynBusAttachment.AboutData.SoftwareVersion = Package.Current.Id.Version.ToString(); this.allJoynBusAttachment.AboutData.IsEnabled = true; this.producer.Service = this; this.producer.Start(); }