SensorbergSDK.BackgroundTaskManager.UnRegisterOnProgressEventHandler C# (CSharp) Method

UnRegisterOnProgressEventHandler() public method

Will remove OnProgress event handlers from advertisement background task OnProgress events are used to indicate UI tasks on beacon actions resolved in background.
public UnRegisterOnProgressEventHandler ( ) : void
return void
        public void UnRegisterOnProgressEventHandler()
        {
            Logger.Debug("UnRegisterOnProgressEventHandler");

            foreach (var taskValue in BackgroundTaskRegistration.AllTasks.Values)
            {
                if (taskValue.Name.Equals(AdvertisementClass))
                {
                    taskValue.Progress -= OnAdvertisementWatcherBackgroundTaskProgress;
                }
            }
        }