예제 #1
0
        /// <summary>
        /// Initializes a new instance of the QueryRepository class.
        /// </summary>
        /// <param name="typeLibrary">The query type library.</param>
        /// <param name="rootQueries">The collection of QueryExpressions used to initialize the RootQueries property</param>
        /// <param name="constants">The collection of QueryConstants used to initialize the Constants property</param>
        /// <param name="scalarTypes">The collection of scalar types.</param>
        /// <param name="rootDataTypes">The root data types.</param>
        /// <param name="dataSet">The data set used to initialize the DataSet property.</param>
        public QueryRepository(QueryTypeLibrary typeLibrary, IEnumerable <QueryExpression> rootQueries, IEnumerable <QueryConstantExpression> constants, IEnumerable <QueryScalarType> scalarTypes, IDictionary <string, QueryStructuralType> rootDataTypes, IQueryDataSet dataSet)
        {
            ExceptionUtilities.CheckArgumentNotNull(typeLibrary, "typeLibrary");
            ExceptionUtilities.CheckArgumentNotNull(rootQueries, "rootQueries");
            ExceptionUtilities.CheckArgumentNotNull(constants, "constants");
            ExceptionUtilities.CheckArgumentNotNull(scalarTypes, "scalarTypes");
            ExceptionUtilities.CheckArgumentNotNull(rootDataTypes, "rootDataTypes");
            ExceptionUtilities.CheckArgumentNotNull(dataSet, "dataSet");

            this.TypeLibrary   = typeLibrary;
            this.RootQueries   = rootQueries.ToList().AsReadOnly();
            this.Constants     = constants.ToList().AsReadOnly();
            this.ScalarTypes   = scalarTypes.ToList().AsReadOnly();
            this.RootDataTypes = new Dictionary <string, QueryStructuralType>(rootDataTypes);
            this.DataSet       = dataSet;
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the GetDefaultQueryTypeVisitor class.
 /// </summary>
 /// <param name="parent">the parent query type library</param>
 public GetDefaultQueryTypeVisitor(QueryTypeLibrary parent)
 {
     this.parent = parent;
 }