コード例 #1
0
        // =======================================================================
        // ConnectorFacade Interface
        // =======================================================================

        protected override APIOperation GetOperationImplementation(SafeType <APIOperation> api)
        {
            APIOperation proxy;

            //first create the inner proxy - this is the proxy that obtaining
            //a connection from the pool, etc
            //NOTE: we want to skip this part of the proxy for
            //validate op, but we will want the timeout proxy
            if (api.RawType.Equals(typeof(ValidateApiOp)))
            {
                OperationalContext context =
                    new OperationalContext(connectorInfo, GetAPIConfiguration());
                proxy = new ValidateImpl(context);
            }
            else if (api.RawType.Equals(typeof(GetApiOp)))
            {
                ConstructorInfo constructor =
                    API_TO_IMPL[SafeType <APIOperation> .Get <SearchApiOp>()];
                ConnectorOperationalContext context =
                    new ConnectorOperationalContext(connectorInfo,
                                                    GetAPIConfiguration(),
                                                    GetPool());

                ConnectorAPIOperationRunnerProxy handler =
                    new ConnectorAPIOperationRunnerProxy(context, constructor);
                proxy =
                    new GetImpl((SearchApiOp)NewAPIOperationProxy(SafeType <APIOperation> .Get <SearchApiOp>(), handler));
            }
            else
            {
                ConstructorInfo constructor =
                    API_TO_IMPL[api];
                ConnectorOperationalContext context =
                    new ConnectorOperationalContext(connectorInfo,
                                                    GetAPIConfiguration(),
                                                    GetPool());

                ConnectorAPIOperationRunnerProxy handler =
                    new ConnectorAPIOperationRunnerProxy(context, constructor);
                proxy =
                    NewAPIOperationProxy(api, handler);
            }

            //TODO: timeout

            // add logging proxy..
            proxy = CreateLoggingProxy(api, proxy);
            return(proxy);
        }
コード例 #2
0
 public static object Convert(Type valueTupleType, object[] argVals)
 {
     return(GetImpl(valueTupleType)(argVals));
 }
コード例 #3
0
 public static object Deserialize(Type resultType, IDataReaderDeserializer deserializer, ExecutionContext executionContext)
 {
     return(GetImpl(resultType)(deserializer, executionContext));
 }