protected override BaseInstanceState FindChild(
ISystemContext context,
QualifiedName browseName,
bool createOrReplace,
BaseInstanceState replacement)
{
if (QualifiedName.IsNull(browseName))
{
return null;
}
BaseInstanceState instance = null;
switch (browseName.Name)
{
case Opc.Ua.Plc.BrowseNames.Priority:
{
if (createOrReplace)
{
if (Priority == null)
{
if (replacement == null)
{
Priority = new PropertyState<uint>(this);
}
else
{
Priority = (PropertyState<uint>)replacement;
}
}
}
instance = Priority;
break;
}
case Opc.Ua.Plc.BrowseNames.Interval:
{
if (createOrReplace)
{
if (Interval == null)
{
if (replacement == null)
{
Interval = new PropertyState<string>(this);
}
else
{
Interval = (PropertyState<string>)replacement;
}
}
}
instance = Interval;
break;
}
case Opc.Ua.Plc.BrowseNames.Single:
{
if (createOrReplace)
{
if (Single == null)
{
if (replacement == null)
{
Single = new PropertyState<string>(this);
}
else
{
Single = (PropertyState<string>)replacement;
}
}
}
instance = Single;
break;
}
}
if (instance != null)
{
return instance;
}
return base.FindChild(context, browseName, createOrReplace, replacement);
}