Exemplo n.º 1
0
 public CosmosProjectionBindingRemovingReadItemExpressionVisitor(
     [NotNull] ReadItemExpression readItemExpression,
     [NotNull] ParameterExpression jObjectParameter,
     bool trackQueryResults)
     : base(jObjectParameter, trackQueryResults)
 {
     _readItemExpression = readItemExpression;
 }
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 protected override Expression VisitExtension(Expression extensionExpression)
 {
     return(extensionExpression switch
     {
         ShapedQueryExpression shapedQueryExpression => VisitShapedQueryExpression(shapedQueryExpression),
         ReadItemExpression readItemExpression => readItemExpression,
         SelectExpression selectExpression => VisitSelect(selectExpression),
         SqlConditionalExpression sqlConditionalExpression => VisitSqlConditional(sqlConditionalExpression),
         _ => base.VisitExtension(extensionExpression),
     });
 public Enumerator(ReadItemQueryingEnumerable <T> readItemEnumerable, CancellationToken cancellationToken = default)
 {
     _cosmosQueryContext        = readItemEnumerable._cosmosQueryContext;
     _readItemExpression        = readItemEnumerable._readItemExpression;
     _shaper                    = readItemEnumerable._shaper;
     _contextType               = readItemEnumerable._contextType;
     _queryLogger               = readItemEnumerable._queryLogger;
     _performIdentityResolution = readItemEnumerable._performIdentityResolution;
     _cancellationToken         = cancellationToken;
 }
Exemplo n.º 4
0
 public Enumerator(ReadItemQueryingEnumerable <T> readItemEnumerable, CancellationToken cancellationToken = default)
 {
     _cosmosQueryContext     = readItemEnumerable._cosmosQueryContext;
     _readItemExpression     = readItemEnumerable._readItemExpression;
     _shaper                 = readItemEnumerable._shaper;
     _contextType            = readItemEnumerable._contextType;
     _queryLogger            = readItemEnumerable._queryLogger;
     _standAloneStateManager = readItemEnumerable._standAloneStateManager;
     _cancellationToken      = cancellationToken;
 }
 public ReadItemQueryingEnumerable(
     CosmosQueryContext cosmosQueryContext,
     ReadItemExpression readItemExpression,
     Func <CosmosQueryContext, JObject, T> shaper,
     Type contextType,
     IDiagnosticsLogger <DbLoggerCategory.Query> logger)
 {
     _cosmosQueryContext = cosmosQueryContext;
     _readItemExpression = readItemExpression;
     _shaper             = shaper;
     _contextType        = contextType;
     _logger             = logger;
 }
 public ReadItemQueryingEnumerable(
     CosmosQueryContext cosmosQueryContext,
     ReadItemExpression readItemExpression,
     Func <CosmosQueryContext, JObject, T> shaper,
     Type contextType,
     bool performIdentityResolution)
 {
     _cosmosQueryContext        = cosmosQueryContext;
     _readItemExpression        = readItemExpression;
     _shaper                    = shaper;
     _contextType               = contextType;
     _queryLogger               = _cosmosQueryContext.QueryLogger;
     _performIdentityResolution = performIdentityResolution;
 }
 public ReadItemQueryingEnumerable(
     CosmosQueryContext cosmosQueryContext,
     ReadItemExpression readItemExpression,
     Func <CosmosQueryContext, JObject, T> shaper,
     Type contextType,
     bool standAloneStateManager)
 {
     _cosmosQueryContext     = cosmosQueryContext;
     _readItemExpression     = readItemExpression;
     _shaper                 = shaper;
     _contextType            = contextType;
     _queryLogger            = _cosmosQueryContext.QueryLogger;
     _standAloneStateManager = standAloneStateManager;
 }
Exemplo n.º 8
0
                public Enumerator(ReadItemQueryingEnumerable <T> readItemEnumerable, CancellationToken cancellationToken = default)
                {
                    _cosmosQueryContext     = readItemEnumerable._cosmosQueryContext;
                    _readItemExpression     = readItemEnumerable._readItemExpression;
                    _shaper                 = readItemEnumerable._shaper;
                    _contextType            = readItemEnumerable._contextType;
                    _queryLogger            = readItemEnumerable._queryLogger;
                    _standAloneStateManager = readItemEnumerable._standAloneStateManager;
                    _readItemEnumerable     = readItemEnumerable;
                    _cancellationToken      = cancellationToken;

                    _concurrencyDetector = readItemEnumerable._threadSafetyChecksEnabled
                        ? _cosmosQueryContext.ConcurrencyDetector
                        : null;
                }
                protected ReadItemBase(
                    ReadItemQueryingEnumerable <T> readItemEnumerable)
                {
#pragma warning disable EF1001
                    _stateManager = readItemEnumerable._cosmosQueryContext.StateManager;
#pragma warning restore EF1001
                    CosmosQueryContext  = readItemEnumerable._cosmosQueryContext;
                    _readItemExpression = readItemEnumerable._readItemExpression;
                    _entityType         = readItemEnumerable._readItemExpression.EntityType;
                    CosmosClient        = readItemEnumerable._cosmosQueryContext.CosmosClient;
                    ContainerId         = _readItemExpression.Container;
                    Shaper      = readItemEnumerable._shaper;
                    ContextType = readItemEnumerable._contextType;
                    Logger      = readItemEnumerable._logger;
                }