namespace Capnp.Rpc { /// /// Generic Proxy implementation which exposes the (usually protected) Call method. /// public class BareProxy: Proxy { /// /// Wraps a capability implementation in a Proxy. /// /// Capability implementation /// Proxy /// is null. /// No found on implemented interface(s). /// Mismatch between generic type arguments (if capability interface is generic). /// Mismatch between generic type arguments (if capability interface is generic). /// Problem with instatiating the Skeleton (constructor threw exception). /// Caller does not have permission to invoke the Skeleton constructor. /// Problem with building the Skeleton type, or problem with loading some dependent class. public static BareProxy FromImpl(object impl) { return new BareProxy(LocalCapability.Create(CapabilityReflection.CreateSkeleton(impl))); } /// /// Constructs an unbound instance. /// public BareProxy() { } /// /// Constructs an instance and binds it to the given low-level capability. /// /// low-level capability public BareProxy(ConsumedCapability cap): base(cap) { } /// /// Requests a method call. /// /// Target interface ID /// Target method ID /// Method arguments /// Answer promise public IPromisedAnswer Call(ulong interfaceId, ushort methodId, DynamicSerializerState args) { return base.Call(interfaceId, methodId, args, default); } } }