public record UpdateDatasetRunningStatusQueryRequest() : IRequest<Option<UpdateDatasetRunningStatusQueryResponse>>;
public record UpdateDatasetRunningStatusQueryResponse();
public class UpdateDatasetRunningStatusQueryHanlder : IRequestHandler<UpdateDatasetRunningStatusQueryRequest, Option<UpdateDatasetRunningStatusQueryResponse>>
{
public async Task<Option<UpdateDatasetRunningStatusQueryResponse>> Handle(UpdateDatasetRunningStatusQueryRequest request, CancellationToken cancellationToken)
{
await Task.CompletedTask;
throw new NotImplementedException();
}
}
코드 조각 생성
새 파일 > XML
값 기입 후 *.snippet 파일로 저장
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet>
<Header>
<Title>UpdateDatasetRunningStatusQuery</Title>
<Shortcut>MediatR</Shortcut>
<Description>Creates a MediatR query and handler for updating dataset running status.</Description>
<Author>SagiKPJH</Author>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>QueryName</ID>
<ToolTip>Name of the query</ToolTip>
<Default>TestQuery</Default>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet>
<Header>
<Title>UpdateDatasetRunningStatusQuery</Title>
<Shortcut>mediatrrequest</Shortcut>
<Description>Creates a MediatR query and handler for updating dataset running status.</Description>
<Author>SagiKPJH</Author>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>QueryName</ID>
<ToolTip>Name of the query</ToolTip>
<Default>TestQuery</Default>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[
public record $QueryName$Request() : IRequest<Option<$QueryName$Response>>;
public record $QueryName$Response();
public class $QueryName$Handler : IRequestHandler<$QueryName$Request, Option<$QueryName$Response>>
{
public async Task<Option<$QueryName$Response>> Handle($QueryName$Request request, CancellationToken cancellationToken)
{
await Task.CompletedTask;
throw new NotImplementedException();
}
}
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
코드 조각 계획
코드 조각 생성
*.snippet
파일로 저장사용