private string ToCreator(CompileAttribute attribute) { return($@"new {_attributeType}({string.Join(", ", attribute.GetValues())}) {{ {string.Join(@", ", attribute.GetProperties().Select(x => $"{x.property} = {x.value}"))} }}"); }
internal static string BuildTypeAttributeMetadata(CompileType type, CompileAttribute attribute, string baseClassOrInterfaceName, string attributeName) { return($@"new AttributedTypeMetadata<{baseClassOrInterfaceName}, {attributeName}>( typeof({type.FullName}), new {attributeName}({string.Join(", ", attribute.GetValues())}) {{ {string.Join(@", ", attribute.GetProperties().Select(x => $"{x.property} = {x.value}"))} }}, () => new {type.FullName}() )"); }