private void OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
        {
            PropertyDescriptor dropboxSessionProperty = faultContext.DataContext.GetProperties()[DropboxSessionPropertyName];
            IDropboxSession    dropboxSession         = dropboxSessionProperty?.GetValue(faultContext.DataContext) as IDropboxSession;

            dropboxSession?.Dispose();
        }
        private void OnCompleted(NativeActivityContext context, ActivityInstance completedInstance)
        {
            if (_dropboxSession == null)
            {
                throw new InvalidOperationException(Resources.DropboxSessionNotFoundException);
            }

            _dropboxSession.Dispose();
        }