当前位置: 首页>>代码示例>>C#>>正文


C# ITimePeriod类代码示例

本文整理汇总了C#中ITimePeriod的典型用法代码示例。如果您正苦于以下问题:C# ITimePeriod类的具体用法?C# ITimePeriod怎么用?C# ITimePeriod使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ITimePeriod类属于命名空间,在下文中一共展示了ITimePeriod类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Call

            /// <summary>
            /// Creates a new call
            /// </summary>
            /// <param name="number"></param>
            /// <param name="period"></param>
            /// <param name="action"></param>
            public Call(Phone.Number number, ITimePeriod period, Action action)
            {
                this.Number = number;
                this.Period = period;

                _result = action;
            }
开发者ID:SleeplessByte,项目名称:life-insights,代码行数:13,代码来源:Phone.Call.cs

示例2: BuildCriteriaOfWorkTimeByDay

 /// <summary>
 /// <see cref="WorkTimeByDay"/> ������ ��ȸ�ϱ� ���� Criteria�� ����մϴ�.
 /// </summary>
 /// <param name="calendarCode"></param>
 /// <param name="workDay"></param>
 /// <param name="workPeriod"></param>
 /// <param name="isWork"></param>
 /// <returns></returns>
 public DetachedCriteria BuildCriteriaOfWorkTimeByDay(string calendarCode,
                                                      DateTime? workDay = null,
                                                      ITimePeriod workPeriod = null,
                                                      bool? isWork = null)
 {
     return BuildQueryOverOfWorkTimeByDay(calendarCode, workDay, workPeriod, isWork).DetachedCriteria;
 }
开发者ID:debop,项目名称:NAccess,代码行数:15,代码来源:CalendarRepository.WorkTimeByUnitTime.cs

示例3: BuildQueryOverOfWorkTimeByDay

        /// <summary>
        /// <see cref="WorkTimeByDay"/> ������ ��ȸ�ϱ� ���� Criteria�� ����մϴ�.
        /// </summary>
        /// <param name="calendarCode"></param>
        /// <param name="workDay"></param>
        /// <param name="workPeriod"></param>
        /// <param name="isWork"></param>
        /// <returns></returns>
        public QueryOver<WorkTimeByDay, WorkTimeByDay> BuildQueryOverOfWorkTimeByDay(string calendarCode,
                                                                                     DateTime? workDay = null,
                                                                                     ITimePeriod workPeriod = null,
                                                                                     bool? isWork = null)
        {
            if(log.IsDebugEnabled)
                log.Debug(@"WorkTimeByDay ������ ��ȸ�ϱ� ���� Criteria�� ����մϴ�... " +
                          @"calendarCode={0}, workDay={1}, workRange={2}, isWork={3}",
                          calendarCode, workDay, workPeriod, isWork);

            var query = QueryOver.Of<WorkTimeByDay>();

            if(calendarCode.IsNotWhiteSpace())
                query.AddWhere(wt => wt.CalendarCode == calendarCode);

            if(workDay.HasValue)
                query.AddWhere(wt => wt.WorkDay == workDay);

            if(workPeriod.IsAnytime == false)
                query.AddBetween(wt => wt.WorkDay, workPeriod.StartAsNullable, workPeriod.EndAsNullable);

            if(isWork.HasValue)
                query.AddNullAsTrue(wt => wt.IsWork, isWork.Value);

            return query;
        }
开发者ID:debop,项目名称:NAccess,代码行数:34,代码来源:CalendarRepository.WorkTimeByUnitTime.cs

示例4: BuildQueryOverOfFavorite

        /// <summary>
        /// 즐겨찾기를 위한 질의 객체 (<see cref="DetachedCriteria"/>)를 빌드합니다.
        /// </summary>
        /// <param name="product">지정된 제품, null이면 검색조건에서 제외합니다.</param>
        /// <param name="company">지정된 회사, null이면 검색조건에서 제외합니다.</param>
        /// <param name="ownerCode">소유자 코드, null이면 검색조건에서 제외합니다.</param>
        /// <param name="ownerKind">소유자 종류, <see cref="ActorKinds.Unknown"/>이면 검색조건에서 제외합니다.</param>
        /// <param name="registerCode">등록자 코드</param>
        /// <param name="registTimeRange">등록일 검색 범위</param>
        /// <returns></returns>
        public virtual QueryOver<Favorite, Favorite> BuildQueryOverOfFavorite(Product product,
                                                                              Company company,
                                                                              string ownerCode,
                                                                              ActorKinds? ownerKind = null,
                                                                              string registerCode = null,
                                                                              ITimePeriod registTimeRange = null)
        {
            if(IsDebugEnabled)
                log.Debug(@"즐겨찾기 조회를 위한 QueryOver를 생성합니다... " +
                          @"company={0}, product={1}, ownerCode={2}, ownerKind={3}, registerCode={4}, registTimeRange={5}",
                          company, product, ownerCode, ownerKind, registerCode, registTimeRange);

            var query = QueryOver.Of<Favorite>();

            if(product != null)
                query.AddWhere(f => f.ProductCode == product.Code);

            if(company != null)
                query.AddWhere(f => f.CompanyCode == company.Code);

            if(ownerCode.IsNotWhiteSpace())
                query.AddWhere(f => f.OwnerCode == ownerCode);

            if(ownerKind.HasValue)
                query.AddWhere(f => f.OwnerKind == ownerKind.Value);

            if(registerCode.IsNotWhiteSpace())
                query.AddWhere(f => f.RegisterCode == registerCode);

            if(registTimeRange != null && registTimeRange.IsAnytime == false)
                query.AddBetween(f => f.RegistDate, registTimeRange.StartAsNullable, registTimeRange.EndAsNullable);

            return query;
        }
开发者ID:debop,项目名称:NAccess,代码行数:44,代码来源:ProductRepository.Favorites.cs

示例5: BuildQueryOverOfUserLoginLog

        /// <summary>
        /// 사용자 로그인 이력을 조회하기 위한 Criteria를 빌드합니다.
        /// </summary>
        /// <param name="productCode">제품 코드</param>
        /// <param name="companyCode">회사 코드</param>
        /// <param name="loginId">로그인 ID (사용자 코드가 아니다)</param>
        /// <param name="localeKey">지역화 정보 (<see cref="CultureInfo.Name"/>)</param>
        /// <param name="loginTimePeriod">로그인 시간의 검색 범위</param>
        /// <returns></returns>
        public QueryOver<UserLoginLog, UserLoginLog> BuildQueryOverOfUserLoginLog(string productCode,
                                                                                  string companyCode = null,
                                                                                  string loginId = null,
                                                                                  string localeKey = null,
                                                                                  ITimePeriod loginTimePeriod = null)
        {
            if(log.IsDebugEnabled)
                log.Debug(@"사용자 로그인 이력을 조회하기 위한 Criteria를 빌드합니다... " +
                          @"productCode={0}, companyCode={1}, loginId={2}, localeKey={3}, loginTimePeriod={4}",
                          productCode, companyCode, loginId, localeKey, loginTimePeriod);

            var query = QueryOver.Of<UserLoginLog>();

            if(productCode.IsNotWhiteSpace())
                query.AddWhere(ulog => ulog.ProductCode == productCode);

            if(companyCode.IsNotWhiteSpace())
                query.AddWhere(ulog => ulog.CompanyCode == companyCode);

            if(loginId.IsNotWhiteSpace())
                query.AddWhere(ulog => ulog.LoginId == loginId);

            if(localeKey.IsNotWhiteSpace())
                query.AddWhere(ulog => ulog.LocaleKey == localeKey);

            if(loginTimePeriod != null && loginTimePeriod.IsAnytime == false)
                query.AddBetween(ulog => ulog.LoginTime, loginTimePeriod.StartAsNullable, loginTimePeriod.EndAsNullable);

            return query;
        }
开发者ID:debop,项目名称:NAccess,代码行数:39,代码来源:LoggingRepository.LoginLog.cs

示例6: HasIntersectionPeriods

        /// <summary>
        /// <paramref name="target"/> 기간과 기간이 교차하는 TimePeriod 요소가 존재하는가?
        /// </summary>
        /// <param name="target"></param>
        /// <returns></returns>
        public virtual bool HasIntersectionPeriods(ITimePeriod target) {
            var result = _periods.Any(p => target.IntersectsWith(p));

            if(IsDebugEnabled)
                log.Debug("target[{0}]과 기간이 교차하는 요소가 존재하는가? [{1}]", target, result);

            return result;
        }
开发者ID:debop,项目名称:NFramework,代码行数:13,代码来源:TimePeriodCollection.cs

示例7: HasOverlapPeriods

        /// <summary>
        /// 대상 TimePeriod와 기간이 겹치는 TimePeriod 요소가 존재하는가?
        /// </summary>
        /// <param name="target"></param>
        /// <returns></returns>
        public virtual bool HasOverlapPeriods(ITimePeriod target) {
            var result = _periods.Any(p => target.OverlapsWith(p));

            if(IsDebugEnabled)
                log.Debug("target[{0}]과 기간이 겹치는 요소가 존재하는가? [{1}]", target, result);

            return result;
        }
开发者ID:debop,项目名称:NFramework,代码行数:13,代码来源:TimePeriodCollection.cs

示例8: HasInsidePeriods

        /// <summary>
        /// 대상 TimePeriod 를 포함하는 TimePeriod 요소가 존재하는가?
        /// </summary>
        /// <param name="target"></param>
        /// <returns></returns>
        public virtual bool HasInsidePeriods(ITimePeriod target) {
            var result = _periods.Any(p => target.HasInside(p));

            if(IsDebugEnabled)
                log.Debug("target[{0}]을 포함하는 요소가 존재하는가? [{1}]", target, result);

            return result;
        }
开发者ID:debop,项目名称:NFramework,代码行数:13,代码来源:TimePeriodCollection.cs

示例9: BuildCriteriaOfUserLoginLog

 /// <summary>
 /// 사용자 로그인 이력을 조회하기 위한 Criteria를 빌드합니다.
 /// </summary>
 /// <param name="productCode">제품 코드</param>
 /// <param name="companyCode">회사 코드</param>
 /// <param name="loginId">로그인 ID (사용자 코드가 아니다)</param>
 /// <param name="localeKey">지역화 정보 (<see cref="CultureInfo.Name"/>)</param>
 /// <param name="loginTimePeriod">로그인 시간의 검색 범위</param>
 /// <returns></returns>
 public DetachedCriteria BuildCriteriaOfUserLoginLog(string productCode,
                                                     string companyCode = null,
                                                     string loginId = null,
                                                     string localeKey = null,
                                                     ITimePeriod loginTimePeriod = null)
 {
     return BuildQueryOverOfUserLoginLog(productCode, companyCode, loginId, localeKey, loginTimePeriod).DetachedCriteria;
 }
开发者ID:debop,项目名称:NAccess,代码行数:17,代码来源:LoggingRepository.LoginLog.cs

示例10: Add

 // ----------------------------------------------------------------------
 public void Add( ITimePeriod period )
 {
     if ( period == null )
     {
         throw new ArgumentNullException( "period" );
     }
     AddPeriod( period.Start, period );
     AddPeriod( period.End, period );
     Sort();
 }
开发者ID:jwg4,项目名称:date-difference,代码行数:11,代码来源:TimeLineMomentCollection.cs

示例11: TimeRange

 // ----------------------------------------------------------------------
 public TimeRange( ITimePeriod copy )
 {
     if ( copy == null )
     {
         throw new ArgumentNullException( "copy" );
     }
     start = copy.Start;
     end = copy.End;
     isReadOnly = copy.IsReadOnly;
 }
开发者ID:HoLoveSalt,项目名称:showhotel,代码行数:11,代码来源:TimeRange.cs

示例12: WorkTimeByRange

        /// <summary>
        /// 생성자
        /// </summary>
        /// <param name="calendar"></param>
        /// <param name="timeRange"></param>
        /// <param name="previousCumulatedWorkInMinute"></param>
        public WorkTimeByRange(Calendar calendar, ITimePeriod timeRange, int previousCumulatedWorkInMinute)
            : base(calendar, timeRange.Start)
        {
            timeRange.ShouldNotBeNull("timeRange");
            Guard.Assert(timeRange.HasPeriod, @"timeRange는 명시적인 구간을 가져야 합니다.");

            TimePeriod.Setup(timeRange.Start, timeRange.End);

            CumulatedInMinute = previousCumulatedWorkInMinute + WorkInMinute;
        }
开发者ID:debop,项目名称:NAccess,代码行数:16,代码来源:WorkTimeByRange.cs

示例13: TimeInterval

        public TimeInterval(ITimePeriod src) : base(src) {
            src.ShouldNotBeNull("src");

            var interval = src as ITimeInterval;
            if(interval != null) {
                _start = interval.StartInterval;
                _end = interval.EndInterval;
                _startEdge = interval.StartEdge;
                _endEdge = interval.EndEdge;
                _isIntervalEnabled = interval.IsIntervalEnabled;
            }
        }
开发者ID:debop,项目名称:NFramework,代码行数:12,代码来源:TimeInterval.cs

示例14: EvaluatePeriod

        // ----------------------------------------------------------------------
        protected override bool EvaluatePeriod( ITimePeriod period, int periodCount )
        {
            TimeSpan allPeriodDuration = new TimeSpan( period.Duration.Ticks * periodCount );

            if ( allPeriodDuration >= remainingDuration )
            {
                targetMoment = period.Start.Add( new TimeSpan( remainingDuration.Ticks / periodCount ) );
                return false;
            }

            remainingDuration = remainingDuration.Subtract( allPeriodDuration );
            return true;
        }
开发者ID:jwg4,项目名称:date-difference,代码行数:14,代码来源:TargetMomentCalculator.cs

示例15: GetReleation

        /// <summary>
        /// <paramref name="period"/>가 <paramref name="target"/>과의 시간 축으로 선 후행 관계를 판단합니다.
        /// </summary>
        /// <param name="period"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public static PeriodRelation GetReleation(this ITimePeriod period, ITimePeriod target) {
            period.ShouldNotBeNull("period");
            target.ShouldNotBeNull("target");

            var relation = PeriodRelation.NoRelation;

            if(period.Start > target.End) {
                relation = PeriodRelation.After;
            }
            else if(period.End < target.Start) {
                relation = PeriodRelation.Before;
            }
            else if(period.Start == target.Start && period.End == target.End) {
                relation = PeriodRelation.ExactMatch;
            }
            else if(period.Start == target.End) {
                relation = PeriodRelation.StartTouching;
            }
            else if(period.End == target.Start) {
                relation = PeriodRelation.EndTouching;
            }
            else if(HasInside(period, target)) {
                if(period.Start == target.Start)
                    relation = PeriodRelation.EnclosingStartTouching;
                else
                    relation = (period.End == target.End) ? PeriodRelation.EnclosingEndTouching : PeriodRelation.Enclosing;
            }
                // 기간이 대상 기간 내부에 속할 때
            else {
                var insideStart = HasInside(target, period.Start);
                var insideEnd = HasInside(target, period.End);

                if(insideStart && insideEnd) {
                    relation = Equals(period.Start, target.Start)
                                   ? PeriodRelation.InsideStartTouching
                                   : period.End == target.End
                                         ? PeriodRelation.InsideEndTouching
                                         : PeriodRelation.Inside;
                }
                else if(insideStart)
                    relation = PeriodRelation.StartInside;

                else if(insideEnd)
                    relation = PeriodRelation.EndInside;
            }

            if(IsDebugEnabled)
                log.Debug("period[{0}]와 target[{1}] 간의 Relation은 [{2}] 입니다.", period.AsString(), target.AsString(), relation);

            return relation;
        }
开发者ID:debop,项目名称:NFramework,代码行数:57,代码来源:TimeTool.Relation.cs


注:本文中的ITimePeriod类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。