/// <summary>Initializes a new instance of the <see cref="EasterDependingHolidayAttribute"/> class.
        /// </summary>
        /// <param name="resourcePropertyName">The property name of the language dependend <see cref="System.String"/> representation of the holiday with respect
        /// to a resource file that is represented by an instance of <see cref="LanguageResourceAttribute"/>.</param>
        /// <param name="offsetToEasterMonday">The offset to easter monday.</param>
        /// <param name="holidayRollingType">A value indicating whether the holiday moves if the holiday agrees with a weekend day.</param>
        public EasterDependingHolidayAttribute(string resourcePropertyName, int offsetToEasterMonday, HolidayRollingType holidayRollingType = HolidayRollingType.NoRolling)
        {
            m_Name = resourcePropertyName;
            ResourcePropertyName = resourcePropertyName;

            m_OffsetToEasterMonday = offsetToEasterMonday;
            m_FirstYear            = Int32.MinValue;
            m_LastYear             = Int32.MaxValue;
            m_HolidayRollingType   = holidayRollingType;
        }
Пример #2
0
 /// <summary>Initializes a new instance of the <see cref="FixHolidayAttribute"/> class.
 /// </summary>
 /// <param name="resourcePropertyName">The property name of the language dependend <see cref="System.String"/> representation of the holiday with respect
 /// to a resource file that is represented by an instance of <see cref="LanguageResourceAttribute"/>.</param>
 /// <param name="day">The day.</param>
 /// <param name="month">The month.</param>
 /// <param name="holidayRollingType">A value indicating whether the holiday moves if the holiday agrees with a weekend day.</param>
 public FixHolidayAttribute(string resourcePropertyName, int day, Month month, HolidayRollingType holidayRollingType = HolidayRollingType.NoRolling)
 {
     ResourcePropertyName = resourcePropertyName;
     m_Day                = day;
     m_Month              = month;
     m_Name               = resourcePropertyName;
     m_FirstYear          = Int32.MinValue;
     m_LastYear           = Int32.MaxValue;
     m_HolidayRollingType = holidayRollingType;
 }
 /// <summary>Initializes a new instance of the <see cref="EasterDependingHoliday"/> class.
 /// </summary>
 /// <param name="holidayName">The (language independent) name of the holiday in its <see cref="IdentifierString"/> representation.</param>
 /// <param name="offsetToEasterMonday">The offset to easter monday (in days).</param>
 /// <param name="firstYear">The first year to take into account the holiday.</param>
 /// <param name="lastYear">The last year to take into account the holiday.</param>
 /// <param name="holidayRollingType">A value indicating whether the holiday moves if the holiday agrees with a weekend day.</param>
 /// <param name="holidayLongName">The (language dependent) long name of the holiday.</param>
 /// <exception cref="ArgumentNullException">Thrown, if <paramref name="holidayName"/> is <c>null</c>.</exception>
 public EasterDependingHoliday(IdentifierString holidayName, int offsetToEasterMonday, int firstYear = Int32.MinValue, int lastYear = Int32.MaxValue, HolidayRollingType holidayRollingType = HolidayCalendars.HolidayRollingType.NoRolling, IdentifierString holidayLongName = null)
 {
     if (holidayName == null)
     {
         throw new ArgumentNullException("holidayName");
     }
     Name     = holidayName;
     LongName = (holidayLongName != null) ? holidayLongName : holidayName;
     m_OffsetToEasterMonday = offsetToEasterMonday;
     FirstYear          = firstYear;
     LastYear           = lastYear;
     HolidayRollingType = holidayRollingType;
 }
Пример #4
0
 /// <summary>Initializes a new instance of the <see cref="FixHoliday"/> class.
 /// </summary>
 /// <param name="holidayName">The (language independent) name of the holiday in its <see cref="IdentifierString"/> representation.</param>
 /// <param name="day">The day.</param>
 /// <param name="month">The month.</param>
 /// <param name="firstYear">The first year to take into account the holiday.</param>
 /// <param name="lastYear">The last year to take into account the holiday.</param>
 /// <param name="holidayRollingType">A value indicating whether the holiday moves if the holiday agrees with a weekend day.</param>
 /// <param name="holidayLongName">The (language dependent) long name of the holiday.</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="holidayName"/> is <c>null</c>.</exception>
 public FixHoliday(IdentifierString holidayName, int day, Month month, int firstYear = Int32.MinValue, int lastYear = Int32.MaxValue, HolidayRollingType holidayRollingType = HolidayRollingType.NoRolling, IdentifierString holidayLongName = null)
 {
     if (holidayName == null)
     {
         throw new ArgumentNullException("holidayName");
     }
     Name               = holidayName;
     LongName           = (holidayLongName != null) ? holidayLongName : holidayName;
     Day                = day;
     Month              = month;
     FirstYear          = firstYear;
     LastYear           = lastYear;
     HolidayRollingType = holidayRollingType;
 }