编写代码片段以用于方法链接

目标

编写代码段,产生以下结果:.Select(k => new { })

测试代码段正文

<Header>
    <Title>SelectAnonymous</Title>
    <Shortcut>selectAnonymous</Shortcut>
    <Description>Shortcut for creating Selects with an anonymous object.</Description>
</Header>
<snippet>
    <Declarations>
        <Literal>
            <ID>ParamName</ID>
            <ToolTip>The name of the parameter</ToolTip>
            <Default>x</Default>
        </Literal>
    </Declarations>
    <Code Language="CSharp">
        <![CDATA[.Select($ParamName$ => new { $end$ })]]>
    </Code>
</snippet>

The Probem

在链接诸如dummyobjectList.selectAnonymous之类的方法时,Visual Studio不建议使用代码段,它只是在此时建议方法。

问题

是否可以“教” Visual Studio或更改代码段,以使Visual Studio建议在现有方法旁边使用代码段(同时使用上述链接方法)?

技术

Visual Studio 2019

挣扎

是真实的

liuchangqi 回答:编写代码片段以用于方法链接

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2977897.html

大家都在问