/// <summary> /// 按时间范围创建Scope,范围错误时,可能为空。 /// </summary> public List <ContextScope> Scope(DateTime start, DateTime end, bool avoidFutureTime = true) { return(ContextScope.Create(_dbConfig.ScopeType, start, end, avoidFutureTime)); //if (scopes.IsNullOrEmpty()) scopes = scopes.NullableAdd(Scope(start)); }
/// <summary> /// DateTime.Today 在当前ScopeType下的ContextScope。 /// </summary> public static ContextScope Today(this ShardScopeType scopeType) { return(ContextScope.Create(scopeType, DateTime.Today)); }
/// <summary> /// 按时间创建Scope /// </summary> public ContextScope Scope(DateTime date) { return(ContextScope.Create(_dbConfig.ScopeType, date)); }