示例#1
0
        public virtual IGraphQueryStep VisitIntersectionQueryStepIntersection(IntersectionQueryStep <Intersection> iqsi)
        {
            _token.ThrowIfCancellationRequested();
            var left  = Visit(iqsi.Left);
            var right = Visit(iqsi.Right);

            if (ReferenceEquals(left, iqsi.Left) && ReferenceEquals(right, iqsi.Right))
            {
                return(iqsi);
            }

            return(new IntersectionQueryStep <Intersection>(left, right, _token, returnEmptyIfRightEmpty: true));
        }
示例#2
0
        public virtual IGraphQueryStep VisitIntersectionQueryStepExcept(IntersectionQueryStep <Except> iqse)
        {
            _token.ThrowIfCancellationRequested();
            var left  = Visit(iqse.Left);
            var right = Visit(iqse.Right);

            if (ReferenceEquals(left, iqse.Left) && ReferenceEquals(right, iqse.Right))
            {
                return(iqse);
            }

            return(new IntersectionQueryStep <Except>(left, right, _token));
        }
 public override void VisitIntersectionQueryStepUnion(IntersectionQueryStep <Union> iqsu)
 {
     _writer.WriteStartObject();
     _writer.WritePropertyName("Type");
     _writer.WriteString("IntersectionQueryStep<Except>");
     _writer.WriteComma();
     _writer.WritePropertyName("Left");
     Visit(iqsu.Left);
     _writer.WriteComma();
     _writer.WritePropertyName("Right");
     Visit(iqsu.Right);
     _writer.WriteComma();
     WriteIntermidiateResults(iqsu.IntermediateResults);
     _writer.WriteEndObject();
 }
        public override async Task VisitIntersectionQueryStepExceptAsync(IntersectionQueryStep <Except> iqse)
        {
            _writer.WriteStartObject();
            _writer.WritePropertyName("Type");
            _writer.WriteString("IntersectionQueryStep<Except>");
            _writer.WriteComma();
            _writer.WritePropertyName("Left");
            await VisitAsync(iqse.Left);

            _writer.WriteComma();
            _writer.WritePropertyName("Right");
            await VisitAsync(iqse.Right);

            _writer.WriteComma();
            WriteIntermidiateResults(iqse.IntermediateResults);
            _writer.WriteEndObject();
        }
示例#5
0
 public virtual async Task VisitIntersectionQueryStepIntersectionAsync(IntersectionQueryStep <Intersection> iqsi)
 {
     await VisitAsync(iqsi.Left);
     await VisitAsync(iqsi.Right);
 }
示例#6
0
 public virtual async Task VisitIntersectionQueryStepUnionAsync(IntersectionQueryStep <Union> iqsu)
 {
     await VisitAsync(iqsu.Left);
     await VisitAsync(iqsu.Right);
 }
示例#7
0
 public virtual async Task VisitIntersectionQueryStepExceptAsync(IntersectionQueryStep <Except> iqse)
 {
     await VisitAsync(iqse.Left);
     await VisitAsync(iqse.Right);
 }
示例#8
0
 public virtual void VisitIntersectionQueryStepIntersection(IntersectionQueryStep <Intersection> iqsi)
 {
     Visit(iqsi.Left);
     Visit(iqsi.Right);
 }
示例#9
0
 public virtual void VisitIntersectionQueryStepUnion(IntersectionQueryStep <Union> iqsu)
 {
     Visit(iqsu.Left);
     Visit(iqsu.Right);
 }
示例#10
0
 public virtual void VisitIntersectionQueryStepExcept(IntersectionQueryStep <Except> iqse)
 {
     Visit(iqse.Left);
     Visit(iqse.Right);
 }