Пример #1
0
        public RestQueryProvider(IRestClient client, ISerializerFactory serializerFactory, IExpressionProcessor expressionProcessor, IMemberNameResolver memberNameResolver, IEnumerable <IValueWriter> valueWriters, Type sourceType)
        {
            CustomContract.Requires(client != null);
            CustomContract.Requires(serializerFactory != null);
            CustomContract.Requires(expressionProcessor != null);
            CustomContract.Requires(valueWriters != null);

            Client               = client;
            _serializerFactory   = serializerFactory;
            _expressionProcessor = expressionProcessor;
            _memberNameResolver  = memberNameResolver;
            _valueWriters        = valueWriters;
            _parameterBuilder    = new ParameterBuilder(client.ServiceBase, sourceType ?? typeof(T));
        }
Пример #2
0
 public RestGetQueryProvider(IRestClient client, ISerializerFactory serializerFactory, IExpressionProcessor expressionProcessor, IMemberNameResolver memberNameResolver, IEnumerable <IValueWriter> valueWriters, Type sourceType)
     : base(client, serializerFactory, expressionProcessor, memberNameResolver, valueWriters, sourceType)
 {
     Contract.Requires(client != null);
     Contract.Requires(serializerFactory != null);
     Contract.Requires(expressionProcessor != null);
     Contract.Requires(valueWriters != null);
     Contract.Requires(sourceType != null);
 }
Пример #3
0
        public RestPutQueryProvider(IRestClient client, ISerializerFactory serializerFactory, IExpressionProcessor expressionProcessor, IMemberNameResolver memberNameResolver, IEnumerable <IValueWriter> valueWriters, Stream inputData, Type sourceType)
            : base(client, serializerFactory, expressionProcessor, memberNameResolver, valueWriters, sourceType)
        {
            CustomContract.Requires(client != null);
            CustomContract.Requires(serializerFactory != null);
            CustomContract.Requires(expressionProcessor != null);
            CustomContract.Requires(valueWriters != null);
            CustomContract.Requires(inputData != null);

            _inputData = inputData;
        }
Пример #4
0
 public SpreadSheetFactory(IExpressionProcessor expressionProcessor, IOnpExpressionHandler expressionHandler)
 {
     _expressionProcessor = expressionProcessor;
     _expressionHandler   = expressionHandler;
 }
Пример #5
0
 public static string GetGageRRFunctionFieldRelationSuffix(IExpressionProcessor function)
 {
     return new Regex("[A-Z,0-9]{8}$").Match(function.Id.ToString().ToUpper()).ToString();
 }
Пример #6
0
 protected RestQueryProviderContracts(IRestClient client, ISerializerFactory serializerFactory, IMemberNameResolver memberNameResolver, IEnumerable <IValueWriter> valueWriters, IExpressionProcessor expressionProcessor, Type sourceType)
     : base(client, serializerFactory, expressionProcessor, memberNameResolver, valueWriters, sourceType)
 {
 }
Пример #7
0
        private string GetAssignmentForPartAverageFunc(IExpressionServiceBase expressionService, IExpressionProcessor func, SourceField subfield)
        {
            var function = func as TwoInOneOutExpression;
            if (function == null)
                return string.Empty;

            var partLabelConnector = function.Connector2In;
            var partLabelScript =
                expressionService.
                    PrepareScriptPart(_expressionContainer.Expressions, partLabelConnector);

            return string.Format(@"
                            msa.SetPartAverageData( 
                                SafeTypeConverter.Convert<string>({0}), 
                                SafeTypeConverter.Convert<double>({1}));
                            "
                , partLabelScript
                , subfield.InnerName);
        }