OPC Studio User's Guide and Reference
DiscoveryUriString Property (UAApplicationElement)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.Discovery Namespace > UAApplicationElement Class : DiscoveryUriString Property
The URL string that can be used to reach the application, using discovery.
Syntax
'Declaration
 
<IgnoreDataMemberAttribute()>
<XmlIgnoreAttribute()>
Public Property DiscoveryUriString As String
'Usage
 
Dim instance As UAApplicationElement
Dim value As String
 
instance.DiscoveryUriString = value
 
value = instance.DiscoveryUriString
[IgnoreDataMember()]
[XmlIgnore()]
public string DiscoveryUriString {get; set;}
[IgnoreDataMember()]
[XmlIgnore()]
public:
property String^ DiscoveryUriString {
   String^ get();
   void set (    String^ value);
}

Property Value

The value of this property cannot be null (Nothing in Visual Basic).

The default value of this property is "" (String.Empty).

Exceptions
ExceptionDescription

A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

This value can be used as OpcLabs.BaseLib.ResourceDescriptor.UrlString.

A generic string is used instead of System.Uri, because in some cases, the value may not represent a real URI.

This value is derived from DiscoveryUriStrings. When DiscoveryUriStrings contains precisely one element, DiscoveryUriString is equal to value of this element. Otherwise, DiscoveryUriString is an empty string. Assigning a non-empty string to DiscoveryUriString clears the DiscoveryUriStrings and adds this string as a single element to the collection. Assigning an empty string to DiscoveryUriString has no effect.

Certain types of discovery queries, such as UALocalApplicationDiscoveryQuery or UALocalApplicationDiscoveryQuery with the Flat parameter set to true always return application elements which have precisely one discovery URI, and in such case it is guaranteed that DiscoveryUriString contains a non-empty string.

This method or property does not throw any exceptions, aside from execution exceptions such as System.Threading.ThreadAbortException or System.OutOfMemoryException.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also