示例#1
0
        public static DateTimeOffset GetSelfExcusionEndDate(SelfExclusion selfEclusionType, DateTimeOffset startDate)
        {
            switch (selfEclusionType)
            {
            case SelfExclusion.Permanent:
                return(DateTimeOffset.MaxValue);

            case SelfExclusion._6months:
                return(startDate.AddMonths(6));

            case SelfExclusion._1Year:
                return(startDate.AddYears(1));

            case SelfExclusion._5Years:
                return(startDate.AddYears(5));

            default:
                return(DateTimeOffset.MinValue);
            }
        }
示例#2
0
 public PlayerSelfExcluded(Guid playerId, SelfExclusion selfExclusion, DateTimeOffset selfExclusionEndDate)
 {
     PlayerId             = playerId;
     SelfExclusionType    = selfExclusion.ToString();
     SelfExclusionEndDate = selfExclusionEndDate;
 }
示例#3
0
 public DateTimeOffset GetSelfExclusionEndDate(SelfExclusion exclusionType, DateTimeOffset startDate)
 {
     return(ExclusionDateHelper.GetSelfExcusionEndDate(exclusionType, startDate));
 }