public GetReferences ( INamable instance, DataDictionary.Interpreter.Filter.BaseFilter expectation, bool lastElement ) : DataDictionary.Interpreter.ReturnValue | ||
instance | INamable | the instance on which this element should be found. |
expectation | DataDictionary.Interpreter.Filter.BaseFilter | the expectation on the element found |
lastElement | bool | Indicates that this element is the last one in a dereference chain |
return | DataDictionary.Interpreter.ReturnValue |
/// <summary> /// Provides the possible references for this term (only available during semantic analysis) /// </summary> /// <param name="instance">the instance on which this element should be found.</param> /// <param name="expectation">the expectation on the element found</param> /// <param name="last">indicates that this is the last element in a dereference chain</param> /// <returns></returns> public ReturnValue GetReferences(INamable instance, BaseFilter expectation, bool last) { ReturnValue retVal = null; if (Designator != null) { retVal = Designator.GetReferences(instance, expectation, last); } else if (LiteralValue != null) { retVal = LiteralValue.GetReferences(instance, expectation, last); } return(retVal); }
/// <summary> /// Provides the possible references types for this expression (used in semantic analysis) /// </summary> /// <param name="instance">the reference instance on which this element should analysed</param> /// <param name="expectation">Indicates the kind of element we are looking for</param> /// <param name="last">indicates that this is the last element in a dereference chain</param> /// <returns></returns> public ReturnValue GetReferenceTypes(INamable instance, BaseFilter expectation, bool last) { ReturnValue retVal = null; if (Designator != null) { retVal = new ReturnValue(); foreach (ReturnValueElement element in Designator.GetReferences(instance, expectation, last).Values) { if (element.Value is Type) { const bool asType = true; retVal.Add(element.Value, null, asType); } } } else if (LiteralValue != null) { retVal = LiteralValue.GetReferenceTypes(instance, expectation, true); } return(retVal); }