示例#1
0
        public static Task <IQueryResult <T> > QueryInterpolatedAsync <T>(this ICluster cluster, QueryOptions options,
                                                                          [InterpolatedStringHandlerArgument("options")] ref QueryInterpolatedStringHandler handler)
        {
            // options will be passed to the constructor of QueryInterpolatedStringHandler so it adds positional
            // parameters as the query string is being built

            return(cluster.QueryAsync <T>(handler.ToStringAndClear(), handler.QueryOptions));
        }
示例#2
0
        public static Task <IQueryResult <T> > QueryInterpolatedAsync <T>(this ICluster cluster, Action <QueryOptions> configureOptions,
                                                                          ref QueryInterpolatedStringHandler handler)
        {
            // handler.QueryOptions will already be filled with positional parameters and AdHoc(false) when we reach this point

            var options = handler.QueryOptions;

            configureOptions.Invoke(options);

            return(cluster.QueryAsync <T>(handler.ToStringAndClear(), options));
        }
示例#3
0
        public static Task <IQueryResult <T> > QueryInterpolatedAsync <T>(this ICluster cluster, ref QueryInterpolatedStringHandler handler)
        {
            // handler.QueryOptions will already be filled with positional parameters and AdHoc(false) when we reach this point

            return(cluster.QueryAsync <T>(handler.ToStringAndClear(), handler.QueryOptions));
        }