示例#1
0
 public override Tuple <string, string, string> GetFormattedFunctionQuickInfo(int parameterIndex)
 {
     if (this.Scope != null)
     {
         CodeNode node = this.Scope.Find(this.ReferencedName);
         NativeXFunctionDeclaration function = node as NativeXFunctionDeclaration;
         if (function != null)
         {
             Dictionary <string, string> genericArguments = new Dictionary <string, string>();
             if (function.GenericParameters != null && this.GenericArguments != null)
             {
                 for (int i = 0; i < Math.Min(this.GenericArguments.Count, function.GenericParameters.Count); i++)
                 {
                     var gp = function.GenericParameters[i];
                     if (gp.ParameterName != null)
                     {
                         genericArguments[gp.ParameterName] = NativeXType.GetFormattedString(this.GenericArguments[i], new Dictionary <string, string>());
                     }
                 }
             }
             return(function.GetFormattedFunctionQuickInfo(parameterIndex, genericArguments));
         }
     }
     return(base.GetFormattedFunctionQuickInfo(parameterIndex));
 }
示例#2
0
 public static string GetFormattedFunctionQuickInfo(NativeXNameTypePair type, Dictionary <string, string> genericArguments)
 {
     return(NativeXType.GetFormattedString(type.Type, genericArguments) + " " + (type.Name ?? "{?}"));
 }
示例#3
0
 public static string GetFormattedString(NativeXType type, Dictionary <string, string> genericArguments)
 {
     return(type == null ? "{?}" : type.ToFormattedString(genericArguments));
 }