using System; namespace Capnp.Rpc { /// /// Annotates a capability interface with its Proxy implementation. /// [AttributeUsage(AttributeTargets.Interface, AllowMultiple = false, Inherited = false)] public class ProxyAttribute : Attribute { /// /// Constructs this attribute. /// /// Proxy type. This must be a class which inherits from and /// exposes a public parameterless constructor. Moreover, it must have same amount of generic type /// parameters like the annotated interface, with identical generic constraints. /// is null. public ProxyAttribute(Type proxyClass) { ProxyClass = proxyClass ?? throw new ArgumentNullException(nameof(proxyClass)); } /// /// The Proxy type. /// public Type ProxyClass { get; } } }