Class JsonRpcProxyInterfaceGroupAttribute
- Namespace
- StreamJsonRpc
- Assembly
- StreamJsonRpc.dll
Specifies the set of additional interfaces that a source generated proxy should implement.
[AttributeUsage(AttributeTargets.Interface, AllowMultiple = true)]
public class JsonRpcProxyInterfaceGroupAttribute : Attribute
- Inheritance
-
JsonRpcProxyInterfaceGroupAttribute
- Inherited Members
Remarks
The interface the attribute is applied to is implicitly included in the group.
Each occurrence of this attribute produces a distinct proxy class. One proxy with all possible interfaces is sufficient if the client allows AcceptProxyWithExtraInterfaces. Otherwise, an interface group should be defined for each set of interfaces that a client may ask for.
For a proxy that implements multiple interfaces, this attribute may appear on any one of them and identify the others. It is recommended to apply it to the primary interface that is most commonly used by clients.
This attribute is meaningless unless accompanied by JsonRpcContractAttribute.
When this attribute is present, proxies will only be generated for the group(s) specified. The applied interface itself may not get its own proxy generated unless an attribute with an empty set of additional interfaces is also applied to it.
Constructors
JsonRpcProxyInterfaceGroupAttribute(params Type[])
Specifies the set of additional interfaces that a source generated proxy should implement.
public JsonRpcProxyInterfaceGroupAttribute(params Type[] additionalInterfaces)
Parameters
additionalInterfaces
Type[]The interfaces to include in the set with the applied interface in a source generated proxy. Each of these interfaces must also be annotated with JsonRpcContractAttribute.
Remarks
The interface the attribute is applied to is implicitly included in the group.
Each occurrence of this attribute produces a distinct proxy class. One proxy with all possible interfaces is sufficient if the client allows AcceptProxyWithExtraInterfaces. Otherwise, an interface group should be defined for each set of interfaces that a client may ask for.
For a proxy that implements multiple interfaces, this attribute may appear on any one of them and identify the others. It is recommended to apply it to the primary interface that is most commonly used by clients.
This attribute is meaningless unless accompanied by JsonRpcContractAttribute.
When this attribute is present, proxies will only be generated for the group(s) specified. The applied interface itself may not get its own proxy generated unless an attribute with an empty set of additional interfaces is also applied to it.
Properties
AdditionalInterfaces
Gets the additional interfaces that a source generated proxy should implement.
public ReadOnlyMemory<Type> AdditionalInterfaces { get; }