// ---------------------------------------------------------------------- /// Determines if the vsObject refers to an element of the given type. /// /// @param vsObj The object on which the search occurs. /// public static bool IsLocalType(iCS_EditorObject vsObj) { // First determine if the type is included inside the GameObject. var iStorage = vsObj.IStorage; var baseType = CodeGenerationUtility.GetBaseType(iStorage); if (vsObj.IsIncludedInType(baseType)) { return(true); } var typeNode = vsObj.ParentTypeNode; if (typeNode == null) { return(false); } if (vsObj.Namespace == CodeGenerationUtility.GetNamespace(iStorage)) { return(vsObj.TypeName == typeNode.CodeName); } return(false); }