Visavi Visual OPC .NET  

ResourceIdentifier Class

Identifies the location to a resource. This class is similar to theUriBuilder class, except that it also enables the user to specify the location of a COM object over a DCOM enabled network.

For a list of all members of this type, see  ResourceIdentifier Members.

System.Object
   Visavi.ResourceIdentifier

[Visual Basic]
 Public
   Class ResourceIdentifier
[C#]
 public class ResourceIdentifier
[C++]
 public __gc class
   ResourceIdentifier
[JScript]
public class ResourceIdentifier

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

The ResourceIdentifier class indicates the location of resources. This class is very similiar to the UriBuilder class, and is able to point to all those with tthe addition of DCOM objects.

Example

[Visual Basic, C#] The following example uses the BrowseItemsForm to illustrate how to use the ResourceIdentifier. The example connects to the Visavi simulation server on the local machine and browses the OPC items. The server is located using the ResourceIdentifier class. By setting the ProgID property to Visavi.OpcSimulation (the ProgID for the server).

[Visual Basic] 
Protected Sub button1_Click(sender As Object, e As System.EventArgs)
   Dim identifier As New ResourceIdentifier()
   identifier.ProgID = "Visavi.OpcSimulation"
   Dim browseItemsForm As New BrowseItemsForm()
   browseItemsForm.ServerIdentifier = identifier
   browseItemsForm.ShowDialog() = DialogResult.OK
End Sub

[C#] 
protected void button1_Click(object sender, System.EventArgs e)
{
   ResourceIdentifier identifier = new ResourceIdentifier();
   identifier.ProgID = "Visavi.OpcSimulation";
   BrowseItemsForm browseItemsForm = new BrowseItemsForm();
   browseItemsForm.ServerIdentifier = identifier;
   browseItemsForm.ShowDialog();
}

Requirements

Namespace: Visavi

Platforms:  Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

Assembly: Visavi.Opc.Client

See Also

ResourceIdentifier Members Visavi Namespace