public static void Attach( IMethodSymbol constructor, string typeName, IList<SyntaxNode> statements, IList<SyntaxNode> baseConstructorArguments, IList<SyntaxNode> thisConstructorArguments) { var info = new CodeGenerationConstructorInfo(typeName, statements, baseConstructorArguments, thisConstructorArguments); s_constructorToInfoMap.Add(constructor, info); }
private static string GetTypeName(CodeGenerationConstructorInfo info, IMethodSymbol constructor) { return info == null ? constructor.ContainingType.Name : info._typeName; }
private static IList<SyntaxNode> GetStatements(CodeGenerationConstructorInfo info) { return info == null ? null : info._statements; }
private static IList<SyntaxNode> GetBaseConstructorArgumentsOpt(CodeGenerationConstructorInfo info) { return info == null ? null : info._baseConstructorArguments; }
private static IList <SyntaxNode> GetThisConstructorArgumentsOpt(CodeGenerationConstructorInfo info) { return(info == null ? null : info._thisConstructorArguments); }
private static string GetTypeName(CodeGenerationConstructorInfo info, IMethodSymbol constructor) => info == null ? constructor.ContainingType.Name : info._typeName;
private static ImmutableArray <SyntaxNode> GetStatements(CodeGenerationConstructorInfo info) => info?._statements ?? default;
private static ImmutableArray <SyntaxNode> GetBaseConstructorArgumentsOpt(CodeGenerationConstructorInfo info) => info?._baseConstructorArguments ?? default;
private static IList <SyntaxNode> GetStatements(CodeGenerationConstructorInfo info) { return(info == null ? null : info.statements); }
private static bool GetIsUnsafe(CodeGenerationConstructorInfo info) => info?._isUnsafe ?? false;