/// <summary> /// Checks if there is an attribute of the same type in this object /// </summary> /// <param name="type">Type to check</param> /// <param name="recursive">Check recursively in ObjectType</param> public bool HasAttributeOfType(DataType type, bool recursive = false) { foreach (KeyValuePair <String, IDefinition> currAttr in attributes.GetEntities()) { if (currAttr.Value == type) { return(true); } if (recursive) { ObjectType attrType = currAttr.Value as ObjectType; if (attrType != null && attrType.HasAttributeOfType(type, recursive)) { return(true); } } } return(false); }
///<see cref="IDeclarator{definitionType}.GetEntities(AccessMode)"/> public Dictionary <string, IDefinition> GetEntities(AccessMode visibility) { return(scope.GetEntities(visibility)); }