Ejemplo n.º 1
0
        /// <summary>
        /// Determine whether a <see cref="T:Quartz.ICalendar"/> with the given identifier already
        ///             exists within the scheduler.
        /// </summary>
        /// <remarks/>
        /// <param name="calName">the identifier to check for</param>
        /// <returns>
        /// true if a calendar exists with the given identifier
        /// </returns>
        public Task <bool> CalendarExists(string calName, CancellationToken cancellationToken = default(CancellationToken))
        {
            _logger.Info("CalendarExists");

            return(Task.FromResult(DoWithLock(() => _storage.CheckExists(calName),
                                              string.Format("could not check if the calendar {0} exists", calName))));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Determine whether a <see cref="T:Quartz.ICalendar"/> with the given identifier already
        ///             exists within the scheduler.
        /// </summary>
        /// <remarks/>
        /// <param name="calName">the identifier to check for</param>
        /// <returns>
        /// true if a calendar exists with the given identifier
        /// </returns>
        public bool CalendarExists(string calName)
        {
            _logger.Info("CalendarExists");

            return(DoWithLock(() => _storage.CheckExists(calName),
                              string.Format("could not check if the calendar {0} exists", calName)));
        }