/// <summary>
        /// Creates a NavigationPropertySingletonExpression expression
        /// </summary>
        /// <param name="type">the return type of the expression</param>
        /// <param name="source">the source expression</param>
        /// <param name="memberExpression">property member name</param>
        /// <param name="resourceType">resource type for expression</param>
        /// <param name="expandPaths">expand paths for resource set</param>
        /// <param name="countOption">count option for the resource set</param>
        /// <param name="customQueryOptions">custom query options for resourcse set</param>
        /// <param name="projection">projection expression</param>
        internal NavigationPropertySingletonExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List<string> expandPaths, CountOption countOption, Dictionary<ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection)
            : base(source, (ExpressionType)ResourceExpressionType.ResourceNavigationPropertySingleton, type, expandPaths, countOption, customQueryOptions, projection)
        {
            Debug.Assert(memberExpression != null, "memberExpression != null");
            Debug.Assert(resourceType != null, "resourceType != null");

            this.memberExpression = memberExpression;
            this.resourceType = resourceType;
        }
示例#2
0
 internal ResourceExpression(Expression source, ExpressionType nodeType, Type type, List <string> expandPaths, CountOption countOption, Dictionary <ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection)
     : base(nodeType, type)
 {
     this.expandPaths        = expandPaths ?? new List <string>();
     this.countOption        = countOption;
     this.customQueryOptions = customQueryOptions ?? new Dictionary <ConstantExpression, ConstantExpression>(ReferenceEqualityComparer <ConstantExpression> .Instance);
     this.projection         = projection;
     this.source             = source;
 }
        /// <summary>
        /// Creates a Resource expression
        /// </summary>
        /// <param name="type">the return type of the expression</param>
        /// <param name="customQueryOptions">The custom query options</param>
        /// <param name="expandPaths">the expand paths</param>
        /// <param name="nodeType">the node type</param>
        /// <param name="countOption">the count option</param>
#pragma warning disable 618
        internal ResourceExpression(Expression source, ExpressionType nodeType, Type type, List<string> expandPaths, CountOption countOption, Dictionary<ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection)
            : base(nodeType, type)
        {
            this.expandPaths = expandPaths ?? new List<string>();
            this.countOption = countOption;
            this.customQueryOptions = customQueryOptions ?? new Dictionary<ConstantExpression, ConstantExpression>(ReferenceEqualityComparer<ConstantExpression>.Instance);
            this.projection = projection;
            this.source = source;
        }
示例#4
0
 /// <summary>
 /// Creates a Resource expression
 /// </summary>
 /// <param name="source">the source expression</param>
 /// <param name="type">the return type of the expression</param>
 /// <param name="expandPaths">the expand paths</param>
 /// <param name="countOption">the count option</param>
 /// <param name="customQueryOptions">The custom query options</param>
 /// <param name="projection">the projection expression</param>
 /// <param name="resourceTypeAs">TypeAs type</param>
 /// <param name="uriVersion">version of the Uri from the expand and projection paths</param>
 internal ResourceExpression(Expression source, Type type, List <string> expandPaths, CountOption countOption, Dictionary <ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection, Type resourceTypeAs, Version uriVersion)
 {
     this.source             = source;
     this.type               = type;
     this.expandPaths        = expandPaths ?? new List <string>();
     this.countOption        = countOption;
     this.customQueryOptions = customQueryOptions ?? new Dictionary <ConstantExpression, ConstantExpression>(ReferenceEqualityComparer <ConstantExpression> .Instance);
     this.projection         = projection;
     this.ResourceTypeAs     = resourceTypeAs;
     this.uriVersion         = uriVersion ?? Util.DataServiceVersion1;
 }
示例#5
0
 internal ResourceExpression(Expression source, System.Type type, List<string> expandPaths, System.Data.Services.Client.CountOption countOption, Dictionary<ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection, System.Type resourceTypeAs, Version uriVersion)
 {
     this.source = source;
     this.type = type;
     this.expandPaths = expandPaths ?? new List<string>();
     this.countOption = countOption;
     this.customQueryOptions = customQueryOptions ?? new Dictionary<ConstantExpression, ConstantExpression>(ReferenceEqualityComparer<ConstantExpression>.Instance);
     this.projection = projection;
     this.ResourceTypeAs = resourceTypeAs;
     this.uriVersion = uriVersion ?? Util.DataServiceVersion1;
 }
        internal ResourceSetExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List<string> expandPaths, CountOption countOption, Dictionary<ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection)
            : base(source, source != null ? (ExpressionType)ResourceExpressionType.ResourceNavigationProperty : (ExpressionType)ResourceExpressionType.RootResourceSet, type, expandPaths, countOption, customQueryOptions, projection)
        {
            Debug.Assert(type != null, "type != null");
            Debug.Assert(memberExpression != null, "memberExpression != null");
            Debug.Assert(resourceType != null, "resourceType != null");
            Debug.Assert(
                (source == null && memberExpression is ConstantExpression) ||
                (source != null && memberExpression is MemberExpression),
                "source is null with constant entity set name, or not null with member expression");

            this.member = memberExpression;
            this.resourceType = resourceType;
            this.sequenceQueryOptions = new List<QueryOptionExpression>();
        }
        /// <summary>
        /// Creates a ResourceSet expression
        /// </summary>
        /// <param name="type">the return type of the expression</param>
        /// <param name="source">the source expression</param>
        /// <param name="memberExpression">property member name</param>
        /// <param name="resourceType">the element type of the resource set</param>
        /// <param name="expandPaths">expand paths for resource set</param>
        /// <param name="countOption">count query option for the resource set</param>
        /// <param name="customQueryOptions">custom query options for resourcse set</param>
        internal ResourceSetExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List <string> expandPaths, CountOption countOption, Dictionary <ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection)
            : base(source, source != null ? (ExpressionType)ResourceExpressionType.ResourceNavigationProperty : (ExpressionType)ResourceExpressionType.RootResourceSet, type, expandPaths, countOption, customQueryOptions, projection)
        {
            Debug.Assert(type != null, "type != null");
            Debug.Assert(memberExpression != null, "memberExpression != null");
            Debug.Assert(resourceType != null, "resourceType != null");
            Debug.Assert(
                (source == null && memberExpression is ConstantExpression) ||
                (source != null && memberExpression is MemberExpression),
                "source is null with constant entity set name, or not null with member expression");

            this.member               = memberExpression;
            this.resourceType         = resourceType;
            this.sequenceQueryOptions = new List <QueryOptionExpression>();
        }
示例#8
0
        internal NavigationPropertySingletonExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List <string> expandPaths, CountOption countOption, Dictionary <ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection)
            : base(source, (ExpressionType)ResourceExpressionType.ResourceNavigationPropertySingleton, type, expandPaths, countOption, customQueryOptions, projection)
        {
            Debug.Assert(memberExpression != null, "memberExpression != null");
            Debug.Assert(resourceType != null, "resourceType != null");

            this.memberExpression = memberExpression;
            this.resourceType     = resourceType;
        }
示例#9
0
 internal ResourceSetExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List<string> expandPaths, CountOption countOption, Dictionary<ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection, Type resourceTypeAs, Version uriVersion) : base(source, type, expandPaths, countOption, customQueryOptions, projection, resourceTypeAs, uriVersion)
 {
     this.member = memberExpression;
     this.resourceType = resourceType;
     this.sequenceQueryOptions = new List<QueryOptionExpression>();
 }
示例#10
0
 internal ResourceSetExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List <string> expandPaths, CountOption countOption, Dictionary <ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection, Type resourceTypeAs, Version uriVersion) : base(source, type, expandPaths, countOption, customQueryOptions, projection, resourceTypeAs, uriVersion)
 {
     this.member               = memberExpression;
     this.resourceType         = resourceType;
     this.sequenceQueryOptions = new List <QueryOptionExpression>();
 }
示例#11
0
        /// <summary>
        /// Creates a ResourceSet expression
        /// </summary>
        /// <param name="type">the return type of the expression</param>
        /// <param name="source">the source expression</param>
        /// <param name="memberExpression">property member name</param>
        /// <param name="resourceType">the element type of the resource set</param>
        /// <param name="expandPaths">expand paths for resource set</param>
        /// <param name="countOption">count query option for the resource set</param>
        /// <param name="customQueryOptions">custom query options for resourcse set</param>
        /// <param name="projection">the projection expression</param>
        /// <param name="resourceTypeAs">TypeAs type</param>
        /// <param name="uriVersion">version of the Uri from the expand and projection paths</param>
        internal ResourceSetExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List <string> expandPaths, CountOption countOption, Dictionary <ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection, Type resourceTypeAs, Version uriVersion)
            : base(source, type, expandPaths, countOption, customQueryOptions, projection, resourceTypeAs, uriVersion)
        {
            Debug.Assert(type != null, "type != null");
            Debug.Assert(memberExpression != null, "memberExpression != null");
            Debug.Assert(resourceType != null, "resourceType != null");
            Debug.Assert(
                (source == null && memberExpression is ConstantExpression) ||
                (source != null && memberExpression is MemberExpression),
                "source is null with constant entity set name, or not null with member expression");

            this.member                = memberExpression;
            this.resourceType          = resourceType;
            this.sequenceQueryOptions  = new List <QueryOptionExpression>();
            this.keyPredicateConjuncts = new List <Expression>();
        }
 internal NavigationPropertySingletonExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List<string> expandPaths, CountOption countOption, Dictionary<ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection, Type resourceTypeAs, Version uriVersion) : base(source, type, expandPaths, countOption, customQueryOptions, projection, resourceTypeAs, uriVersion)
 {
     this.memberExpression = memberExpression;
     this.resourceType = resourceType;
 }
 internal NavigationPropertySingletonExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List <string> expandPaths, CountOption countOption, Dictionary <ConstantExpression, ConstantExpression> customQueryOptions, ProjectionQueryOptionExpression projection, Type resourceTypeAs, Version uriVersion) : base(source, type, expandPaths, countOption, customQueryOptions, projection, resourceTypeAs, uriVersion)
 {
     this.memberExpression = memberExpression;
     this.resourceType     = resourceType;
 }