Пример #1
0
 internal RemoteValueProxy(GrpcConnection connection, GrpcSbValue grpcSbValue)
     : this(connection,
            new RemoteValueRpcServiceClient(connection.CallInvoker), grpcSbValue,
            new GrpcValueFactory(), new GrpcErrorFactory(), new GrpcTypeFactory(),
            new CachedValueFactory())
 {
 }
Пример #2
0
        internal RemoteValueProxy(
            GrpcConnection connection, RemoteValueRpcServiceClient client,
            GrpcSbValue grpcSbValue, GrpcValueFactory valueFactory, GrpcErrorFactory errorFactory,
            GrpcTypeFactory typeFactory, CachedValueFactory cachedValueFactory)
        {
            this.connection         = connection;
            this.client             = client;
            this.grpcSbValue        = grpcSbValue;
            this.valueFactory       = valueFactory;
            this.errorFactory       = errorFactory;
            this.typeFactory        = typeFactory;
            this.cachedValueFactory = cachedValueFactory;

            // Keep a handle to objects we need in the destructor.
            gcHandle = GCHandle.Alloc(
                new Tuple <GrpcConnection, RemoteValueRpcServiceClient, GrpcSbValue>(
                    connection, client, grpcSbValue));
        }
Пример #3
0
 public virtual RemoteValue Create(
     GrpcConnection connection, GrpcSbValue grpcSbValue)
 {
     return(new RemoteValueProxy(connection, grpcSbValue));
 }