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 Boiler.BrowseNames.Measurement:
{
if (createOrReplace)
{
if (Measurement == null)
{
if (replacement == null)
{
Measurement = new PropertyState<double>(this);
}
else
{
Measurement = (PropertyState<double>)replacement;
}
}
}
instance = Measurement;
break;
}
case Boiler.BrowseNames.SetPoint:
{
if (createOrReplace)
{
if (SetPoint == null)
{
if (replacement == null)
{
SetPoint = new PropertyState<double>(this);
}
else
{
SetPoint = (PropertyState<double>)replacement;
}
}
}
instance = SetPoint;
break;
}
case Boiler.BrowseNames.ControlOut:
{
if (createOrReplace)
{
if (ControlOut == null)
{
if (replacement == null)
{
ControlOut = new PropertyState<double>(this);
}
else
{
ControlOut = (PropertyState<double>)replacement;
}
}
}
instance = ControlOut;
break;
}
}
if (instance != null)
{
return instance;
}
return base.FindChild(context, browseName, createOrReplace, replacement);
}
#endregion