public CSType ToCSType(IEnumerable <CSType> genericReplacements) { List <CSType> replacements = genericReplacements.ToList(); if (replacements.Count < GenericParams.Count) { replacements.AddRange(GenericParams.Skip(replacements.Count).Select(gen => new CSSimpleType(gen.Name.Name))); } CSSimpleType t = new CSSimpleType(Name.Name, false, replacements.ToArray()); return(t); }
public static CSArray1D New(CSSimpleType type, bool isStackAlloc, params CSBaseExpression[] parameters) { string ID = (isStackAlloc ? "stackalloc " : "new ") + type.Name; return(new CSArray1D(ID, parameters)); }
public static CSFunctionCall Typeof (CSSimpleType t) { CommaListElementCollection<CSBaseExpression> parms = new CommaListElementCollection<CSBaseExpression> (); parms.Add (new CSIdentifier (t.Name)); return new CSFunctionCall (iTypeof, parms, false); }