Interface IBowireSchemaHints
- Namespace
- Kuestenlogik.Bowire.Semantics
- Assembly
- Kuestenlogik.Bowire.dll
Optional companion interface to IBowireProtocol: a protocol plugin that knows the shape of its own payloads in advance (DIS PDU layouts, TacticalAPI situation objects, …) can pre-populate annotations for those shapes by implementing this interface.
public interface IBowireSchemaHints
Remarks
Returned annotations enter the resolver at Plugin priority — overriding the auto-detector, overridden by the user. Returning an empty sequence is the supported "this plugin has no opinion" default and is exactly what protocol plugins that carry opaque user payloads (REST, GraphQL, generic gRPC, …) should do.
The interface is intentionally orthogonal to IBowireProtocol so existing plugins are not forced to think about semantics. A plugin implements both interfaces on the same class when it wants to ship hints; the host's plugin registry casts on demand.
Methods
GetSchemaHints(string, string)
Annotations this plugin would like to contribute for the given
serviceId / methodId pair.
May return an empty sequence (nothing to contribute) and the
resolver behaves as if the plugin had not opted in.
IEnumerable<Annotation> GetSchemaHints(string serviceId, string methodId)
Parameters
serviceIdstringService identifier the plugin returned from
DiscoverAsync.methodIdstringMethod identifier within
serviceId.