Skip to content

Commit

Permalink
Fix IDE0060 and disable SA1313
Browse files Browse the repository at this point in the history
PR with fixes for SA1313 in progress DotNetAnalyzers/StyleCopAnalyzers#3892
  • Loading branch information
Kielek committed Oct 30, 2024
1 parent f749c9c commit 083666f
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,33 @@ namespace OpenTelemetry.Instrumentation.AWSLambda.Tests;
internal class SampleHandlers
{
// Action<TInput, ILambdaContext>
public void SampleHandlerSyncInputAndNoReturn(string str, ILambdaContext context)
#pragma warning disable SA1313
public void SampleHandlerSyncInputAndNoReturn(string _1, ILambdaContext _2)
{
}

// Func<TInput, ILambdaContext, TResult>
public string SampleHandlerSyncInputAndReturn(string str, ILambdaContext context)
public string SampleHandlerSyncInputAndReturn(string str, ILambdaContext _2)
{
return str;
}

// Func<TInput, ILambdaContext, Task>
public async Task SampleHandlerAsyncInputAndNoReturn(string str, ILambdaContext context)
public async Task SampleHandlerAsyncInputAndNoReturn(string _1, ILambdaContext _2)
{
await Task.Delay(10);
}

// Func<TInput, ILambdaContext, Task<TResult>>
public async Task<string> SampleHandlerAsyncInputAndReturn(string str, ILambdaContext context)
public async Task<string> SampleHandlerAsyncInputAndReturn(string str, ILambdaContext _2)
{
await Task.Delay(10);
return str;
}

public void SampleHandlerSyncNoReturnException(string str, ILambdaContext context)
// Action<TInput, ILambdaContext>
public void SampleHandlerSyncNoReturnException(string str, ILambdaContext _2)
#pragma warning restore SA1313
{
throw new Exception(str);
}
Expand Down

0 comments on commit 083666f

Please sign in to comment.