How to:Determine the Discovery Version of a Probe Request
.NET Framework 4.5
A discovery proxy may expose multiple discovery endpoints using different discovery versions. When a UDP multicast Probe request arrives at the proxy the proxy should respond with a multicast suppression message. In order to do this it would have to know the discovery version of the request.
To Determine the Discovery Version of a Probe Request
-
In the method that responds to a Probe request (for example OnBeginFind) use the static Current property to search for a DiscoveryOperationContextExtension as shown in the following code.
DiscoveryOperationContextExtension doce = OperationContext.Current.Extensions.Find<DiscoveryOperationContextExtension>(); // Access the discovery version from the DiscoveryOperationContextExtension doce.DiscoveryVersion;
See Also
Tasks
Discovery Proxy SampleReference
DiscoveryVersionOther Resources
Implementing a Discovery Proxy
Build Date: