Method GetViewReference
- Namespace
- Skyline.DataMiner.Core.DataMinerSystem.Common
- Assembly
- Skyline.DataMiner.Core.DataMinerSystem.Common.dll
GetViewReference(int)
Initializes a new instance of IDmsView which acts as a reference to an existing view.
IDmsView GetViewReference(int viewId)
Parameters
viewId
intThe ID of the view.
Returns
Remarks
This method can be used as an alternative to the GetView(int) or GetView(string) method.
The GetView(int) or GetView(string) will in the background perform an SLNet call to request info about the view.
Using this method, this additional SLNet call will not always be performed, which can improve performance.
However, if you create a Skyline.DataMiner.Core.DataMinerSystem.Common.DmsView object with a viewId
that does not exist on the System, a ViewNotFoundException will only be thrown when a call to the server is performed.
Using the GetView(int) or GetView(string) methods will already throw an exception if the view does not exist when the method executes.
In summary, you can use this method if you are sure the view exists which can result in improved performance because some additional SLNet calls can be avoided.
If you do not know the view exists, you should use the <xref href="Skyline.DataMiner.Core.DataMinerSystem.Common.IDms.GetView(System.Int32)" data-throw-if-not-resolved="false"></xref> or <xref href="Skyline.DataMiner.Core.DataMinerSystem.Common.IDms.GetView(System.String)" data-throw-if-not-resolved="false"></xref> method.
</p>