public TypeArray AllocParams(params CType[] types) { if (types == null || types.Length == 0) { return(s_taEmpty); } TypeArrayKey key = new TypeArrayKey(types); TypeArray result; if (!tableTypeArrays.TryGetValue(key, out result)) { result = new TypeArray(types); tableTypeArrays.Add(key, result); } return(result); }
public static TypeArray Allocate(params CType[] types) { if (types?.Length > 0) { TypeArrayKey key = new TypeArrayKey(types); if (!s_tableTypeArrays.TryGetValue(key, out TypeArray result)) { result = new TypeArray(types); s_tableTypeArrays.Add(key, result); } return(result); } return(Empty); }