Exemple #1
0
        public override Type CSharpSignatureType(TypePrinterContext ctx)
        {
            if (ctx.Kind == TypePrinterContextKind.Native)
            {
                return(new CustomType("Std.Vector"));
            }

            return(new CustomType($"Std.Vector<{ctx.GetTemplateParameterList()}>"));
        }
Exemple #2
0
        public override string CSharpSignature(TypePrinterContext ctx)
        {
            if (ctx.Kind == TypePrinterContextKind.Native)
            {
                return("Std.Vector");
            }

            return(string.Format("Std.Vector<{0}>", ctx.GetTemplateParameterList()));
        }
Exemple #3
0
        public override string CSharpSignature(TypePrinterContext ctx)
        {
            if (ctx.Kind == TypePrinterContextKind.Native)
            {
                return(string.Format("QList.{0}{1}", Helpers.InternalStruct,
                                     Type.IsAddress() ? "*" : string.Empty));
            }

            return(string.Format("System.Collections.Generic.{0}<{1}>",
                                 ctx.MarshalKind == MarshalKind.DefaultExpression ? "List" : "IList",
                                 ctx.GetTemplateParameterList()));
        }
Exemple #4
0
        public override string CSharpSignature(TypePrinterContext ctx)
        {
            if (ctx.Kind == TypePrinterContextKind.Native)
            {
                var type           = (TemplateSpecializationType)ctx.Type.Desugar();
                var specialization = type.GetClassTemplateSpecialization();
                var typePrinter    = new CSharpTypePrinter(null);
                typePrinter.PushContext(TypePrinterContextKind.Native);
                return(string.Format($"{specialization.Visit(typePrinter)}{(Type.IsAddress() ? "*" : string.Empty)}", specialization.Visit(typePrinter),
                                     Type.IsAddress() ? "*" : string.Empty));
            }

            return(string.Format("System.Collections.Generic.{0}<{1}>",
                                 ctx.MarshalKind == MarshalKind.DefaultExpression ? "List" : "IList",
                                 ctx.GetTemplateParameterList()));
        }
Exemple #5
0
 public override Type CLISignatureType(TypePrinterContext ctx)
 {
     return(new CustomType(
                $"System::Collections::Generic::List<{ctx.GetTemplateParameterList()}>^"));
 }
Exemple #6
0
 public override string CLISignature(TypePrinterContext ctx)
 {
     return(string.Format("System::Collections::Generic::List<{0}>^",
                          ctx.GetTemplateParameterList()));
 }