/// <summary> /// Used for <see cref="SynthesizedDelegateSymbol"/> construction. /// </summary> protected SynthesizedContainer(NamespaceOrTypeSymbol containingSymbol, string name, int parameterCount, bool returnsVoid) { var typeParameters = new TypeParameterSymbol[parameterCount + (returnsVoid ? 0 : 1)]; for (int i = 0; i < parameterCount; i++) { typeParameters[i] = new AnonymousTypeManager.AnonymousTypeParameterSymbol(this, i, "T" + (i + 1)); } if (!returnsVoid) { typeParameters[parameterCount] = new AnonymousTypeManager.AnonymousTypeParameterSymbol(this, parameterCount, "TResult"); } this.containingSymbol = containingSymbol; this.name = name; this.TypeMap = TypeMap.Empty; this.typeParameters = typeParameters.AsImmutableOrNull(); }