Пример #1
0
        internal ComputeBinder(ODataQuerySettings settings, IWebApiAssembliesResolver assembliesResolver, Type elementType,
                               IEdmModel model, ComputeTransformationNode transformation)
            : base(settings, assembliesResolver, elementType, model)
        {
            Contract.Assert(transformation != null);

            _transformation = transformation;
            _modelID        = ModelContainer.GetModelID(model);

            this.ResultClrType = typeof(ComputeWrapper <>).MakeGenericType(this.ElementType);
        }
Пример #2
0
        public SelectExpandBinder(ODataQuerySettings settings, SelectExpandQueryOption selectExpandQuery)
        {
            Contract.Assert(settings != null);
            Contract.Assert(selectExpandQuery != null);
            Contract.Assert(selectExpandQuery.Context != null);
            Contract.Assert(selectExpandQuery.Context.Model != null);
            Contract.Assert(settings.HandleNullPropagation != HandleNullPropagationOption.Default);

            _selectExpandQuery = selectExpandQuery;
            _context           = selectExpandQuery.Context;
            _model             = _context.Model;
            _modelID           = ModelContainer.GetModelID(_model);
            _settings          = settings;
        }