其他分享
首页 > 其他分享> > .Net Core WebApi Controller方法代码片段

.Net Core WebApi Controller方法代码片段

作者:互联网

1.效果

2.代码片段代码

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
	<CodeSnippet Format="1.0.0">
		<Header>
			<Title>apifunc</Title>
			<Shortcut>apifunc</Shortcut>
			<Description>webApi方法的代码片段</Description>
			<Author>wp</Author>
			<SnippetTypes>
				<SnippetType>Expansion</SnippetType>
			</SnippetTypes>
		</Header>
		<Snippet>
			<Declarations>
				<Literal>
					<ID>type</ID>
					<ToolTip>类型</ToolTip>
					<Default>string</Default>
				</Literal>
				<Literal>
					<ID>methodname</ID>
					<ToolTip>方法名</ToolTip>
					<Default>MyMethod</Default>
				</Literal>
			</Declarations>
			<Code Language="csharp"><![CDATA[public Task<ActionResult<IEnumerable<$type$>>> $methodname$ ()
	{
		$end$
	}]]>
			</Code>
		</Snippet>
	</CodeSnippet>
</CodeSnippets>

 

标签:WebApi,Core,片段,methodname,apifunc,代码,Controller,方法
来源: https://blog.csdn.net/wu_pan123/article/details/120193491