protected override void VisitParameter(VBParameter node) { VisitIfNotNull(node.ParameterType); if (node.IsByRef) { Code.Append("@"); } }
protected override void VisitParameter(VBParameter node) { VisitIfNotNull(node.ParameterType); if (node.IsByRef) Code.Append("@"); }
private static string ToIndexId(Symbol symbol, ISourceFile file) { VBParameter vBParameter = symbol as VBParameter; if (vBParameter != null) { return(null); } VBMember vBMember = symbol as VBMember; if (vBMember != null) { if (vBMember.IsFunctionResultLocal) { return(null); } while (vBMember.ContainingMember != null) { vBMember = vBMember.ContainingMember; } if (vBMember.IsProperty && vBMember.Name == "Value" && vBMember.ContainingType != null && vBMember.ContainingType.Name == "InternalXmlHelper") { return(null); // "vb.XmlPropertyExtensionValue"; } if (vBMember.IsProperty && vBMember.SourceFile != null && vBMember.SourceFile.IsSolutionExtension) { if (vBMember.Name == "Computer") { return("T:Microsoft.VisualBasic.Devices." + vBMember.Name); } if (vBMember.Name == "User") { return("T:Microsoft.VisualBasic.ApplicationServices." + vBMember.Name); } if (vBMember.Name == "Application") { return(null); //"My." + vBMember.Name; } if (vBMember.ReturnType != null && vBMember.ReturnType.BaseClass != null) { return("T:Microsoft.VisualBasic.ApplicationServices." + vBMember.ReturnType.BaseClass.Name); } return(null); //"My." + vBMember.Name; } else { if (vBMember.IsSynthetic || (vBMember.IsField && vBMember.SourceFile != null)) { symbol = vBMember.ReturnType; } else { VBType containingType = vBMember.ContainingType; if (containingType != null && (containingType.IsAnonymousType || containingType.IsAnonymousDelegate)) { return(null); // "vb.AnonymousType"; } } } } VBType vBType = symbol as VBType; while (vBType != null) { if (vBType.IsArray || vBType.IsPointer) { vBType = vBType.ElementType; } else { if (vBType.DefiningType == null) { break; } vBType = vBType.DefiningType; if (vBType == file.Host.RuntimeInfo.NullableType) { return(null); //"vb.Nullable"; } } } if (vBType != null) { if (vBType.IsPrimitive) { return("T:System." + vBType.TypeCode.ToString()); // "vb." + vBType.Name; } if (vBType.IsAnonymousType || vBType.IsAnonymousDelegate) { return(null); //"vb.AnonymousType"; } if (vBType == file.Binder.ResolveType("System.Runtime.CompilerServices.ExtensionAttribute", 0)) { return(null); //"vb.ExtensionMethods"; } } if (symbol is VBNamespace) { return(null); } if (symbol != null) { // CodeBuilder adds unavoidable spaces; IndexIds never have spaces. return(symbol.ToString(new IndexIdSymbolFormatter()).Replace(" ", "")); } return(null); }