private Variable getVariableUsage(VariableIdentifier hv)
{
Variable sdvu = new Variable();
if (hv.id != 0)
{
var dsVar = (from v in this.StructuredDataStructure.Variables
where v.Id == hv.id && v.Label == hv.name
select v).FirstOrDefault();
if (dsVar != null) sdvu = dsVar;
}
else
{
var dsVar = (from v in this.StructuredDataStructure.Variables
where v.Label == hv.name
select v).FirstOrDefault();
if (dsVar != null) sdvu = dsVar;
}
return sdvu;
}