I wanted to learn some C# and .net and network stuff. Thus, I've chosen the OPC UA code.
On github: UA-.NETStandard/Stack/Opc.Ua.Core/Stack/Client/DiscoveryClient.cs
But I really don't understand how this method works:
public virtual EndpointDescriptionCollection GetEndpoints(StringCollection profileUris)
{
EndpointDescriptionCollection endpoints = null;
GetEndpoints(
null,
this.Endpoint.EndpointUrl,
null,
profileUris,
out endpoints);
return PatchEndpointUrls(endpoints);
}
I understand that it is a recursive method, calling itself over and over again.
- How does it ever end? Is it maybe a continuous polling?
- Is the inner call's argument(s) "null,this.Endpoint.EndpointUrl,null,profileUris,out endpoints" a StringCollection? Because the StringCollection "profileUris" is already a StringCollection!?
question from:
https://stackoverflow.com/questions/65934017/how-does-the-recursive-getendpoints-method-of-the-opc-ua-netstandard-work 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…