repo_name stringlengths 1 52 | repo_creator stringclasses 6
values | programming_language stringclasses 4
values | code stringlengths 0 9.68M | num_lines int64 1 234k |
|---|---|---|---|---|
aws-lambda-dotnet | aws | C# | using Xunit;
namespace TestServerlessApp.IntegrationTests
{
[CollectionDefinition("Integration Tests")]
public class IntegrationTestContextFixtureCollection : ICollectionFixture<IntegrationTestContextFixture>
{
}
} | 9 |
aws-lambda-dotnet | aws | C# | using System;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
namespace TestServerlessApp.IntegrationTests
{
[Collection("Integration Tests")]
public class SimpleCalculator
{
private readonly IntegrationTestContextFixture _fixture;
p... | 94 |
aws-lambda-dotnet | aws | C# | using System.Linq;
using System.Threading.Tasks;
using Amazon.CloudFormation;
using Amazon.CloudFormation.Model;
namespace TestServerlessApp.IntegrationTests.Helpers
{
public class CloudFormationHelper
{
private readonly IAmazonCloudFormation _cloudFormationClient;
public CloudFormationHelp... | 75 |
aws-lambda-dotnet | aws | C# | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.CloudWatchLogs;
using Amazon.CloudWatchLogs.Model;
namespace TestServerlessApp.IntegrationTests.Helpers
{
public class CloudWatchHelper
{
private readonly IAmazonCloudWatchLogs _cloudWatchlogsClient;
... | 87 |
aws-lambda-dotnet | aws | C# | #nullable enable
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace TestServerlessApp.IntegrationTests.Helpers
{
public static class CommandLineWrapper
{
public static async Task RunAsync(st... | 71 |
aws-lambda-dotnet | aws | C# | using System.Collections.Generic;
using System.Threading.Tasks;
using Amazon.Lambda;
using Amazon.Lambda.Model;
namespace TestServerlessApp.IntegrationTests.Helpers
{
public class LambdaHelper
{
private readonly IAmazonLambda _lambdaClient;
public LambdaHelper(IAmazonLambda lambdaClient)
... | 74 |
aws-lambda-dotnet | aws | C# | using System.Linq;
using System.Threading.Tasks;
using Amazon.S3;
using Amazon.S3.Model;
namespace TestServerlessApp.IntegrationTests.Helpers
{
public class S3Helper
{
private readonly IAmazonS3 _s3Client;
public S3Helper(IAmazonS3 s3Client)
{
_s3Client = s3Client;
... | 37 |
aws-lambda-dotnet | aws | C# | using System;
namespace TestServerlessApp.IntegrationTests.Helpers
{
public static class StaticHelpers
{
public static TimeSpan GetWaitTime(int attemptCount)
{
var waitTime = Math.Pow(2, attemptCount) * 5;
return TimeSpan.FromSeconds(waitTime);
}
}
} | 13 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.AspNetCoreServer;
namespace TestWebApp
{
public class ALBLambdaFunction : ApplicationLoadBalancerFunction<Startup>
{
}
}
| 9 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.AspNetCoreServer;
namespace TestWebApp
{
public class ApiGatewayLambdaFunction : APIGatewayProxyFunction<Startup>
{
}
}
| 9 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.AspNetCoreServer;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
#if !NETCOREAPP_2_1
namespace TestWebApp
{
public interface IMethodsCalled
{
bool InitHostBuilder { get; set; }
bool InitHostWebBuilder { get; set; }
}
public class HostBuil... | 144 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.AspNetCoreServer;
namespace TestWebApp
{
public class HttpV2LambdaFunction : APIGatewayHttpApiV2ProxyFunction<Startup>
{
}
} | 7 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.Core;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace TestWebApp
{
public class Middleware
{
private readonly RequestDelegate _next;
public Middleware(RequestDele... | 35 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Builder;
namespace TestWebApp
{
public class Program
{
public static void Main(string[] args)
{
var hos... | 26 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.ResponseCompression;
using Microsoft.Extensions.Configuration;
using Microsoft.Extension... | 142 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
namespace TestWebApp.Contro... | 24 |
aws-lambda-dotnet | aws | C# | using Microsoft.AspNetCore.Mvc;
using System.IO;
using static System.Net.Mime.MediaTypeNames;
namespace TestWebApp.Controllers
{
[Route("api/binary")]
public class BinaryContentController : Controller
{
[HttpGet]
public IActionResult Get([FromQuery] string firstName, [FromQuery] string last... | 31 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class BodyTestsController : Controller
{
[HttpPut]
public string PutBody([FromBody] Pers... | 26 |
aws-lambda-dotnet | aws | C# | using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class CompressResponseController : ControllerBase
{
[HttpGet]
public IActionResult Get()
{
var response = "[\"value1\",\"value2\"]";
return Content(respon... | 16 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class CookieTestsController : Controller
{
[HttpGet]
public string Get()
{
... | 43 |
aws-lambda-dotnet | aws | C# | using System;
using System.IO;
using System.Reflection;
using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class ErrorTestsController
{
[HttpGet]
public string Get([FromQuery]string id)
{
if (id == "typeload-test")
... | 32 |
aws-lambda-dotnet | aws | C# | using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class MTlsTestController : Controller
{
// GET: api/<controller>
[HttpGet]
public string Get()
{
return Request.HttpContext.Connection.ClientCertificate?.Subj... | 15 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class QueryStringController : Controller
{
[HttpGet]
public string Get([FromQuery] strin... | 24 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class RawQueryStringController : Controller
{
[HttpGet]
public string Get()
{
... | 36 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class RedirectTestController : Controller
{
// GET api/values
[HttpGet]
public A... | 34 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class RequestServicesExampleController : ControllerBase
{
[HttpGet]
public string Get()
... | 19 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class ResourcePathController : Controller
{
// GET api/values
[HttpGet]
public IE... | 42 |
aws-lambda-dotnet | aws | C# | using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class TraceTestsController : Controller
{
[HttpGet]
public string GetTraceId()
{
return this.HttpContext.TraceIdentifier;
}
}
}
| 15 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace TestWebApp.Controllers
{
[Route("api/[controller]")]
public class ValuesController : Controller
{
// GET api/values
... | 54 |
aws-lambda-dotnet | aws | C# | using System;
namespace Amazon.Lambda.TestTool
{
public class CommandLineOptions
{
public string Host { get; set; }
public int? Port { get; set; }
public bool NoLaunchWindow { get; set; }
public string Path { get; set; }
public bool NoUI { get; set; }
pub... | 187 |
aws-lambda-dotnet | aws | C# | using System;
namespace Amazon.Lambda.TestTool
{
public class InvokeParameters
{
public string Profile { get; set; }
public string Region { get; set; }
public string Payload { get; set; }
}
}
| 11 |
aws-lambda-dotnet | aws | C# | using System;
using System.Text.Json.Serialization;
namespace Amazon.Lambda.TestTool
{
public class LambdaConfigFile
{
public string Framework { get; set; }
public string Profile { get; set; }
public string Region { get; set; }
public string Template { get; set; }
[... | 36 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.TestTool.Runtime;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace Amazon.Lambda.TestTool
{
public class LocalLambdaOptions
{
public string Host { get; set; }
public int? Port { get; set; }
public IList<string> Lambda... | 82 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.TestTool.Runtime;
using Amazon.Lambda.TestTool.SampleRequests;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
namespace Amazon.Lambda.TestTool
{
public class TestToolStartup
{
public class RunConfiguration
{
public enum RunMode { N... | 360 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.Json;
using Amazon.Lambda.TestTool.Runtime;
namespace Amazon.Lambda.TestTool
{
publi... | 246 |
aws-lambda-dotnet | aws | C# | using System;
using System.IO;
using System.Text;
using Amazon.Lambda.Core;
namespace Amazon.Lambda.TestTool.Runtime
{
/// <summary>
/// This class is used to capture standard out and standard error when executing the Lambda function.
/// </summary>
public class ConsoleOutWrapper : IDisposable
{... | 64 |
aws-lambda-dotnet | aws | C# | using Amazon.SQS.Model;
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
namespace Amazon.Lambda.TestTool.Runtime
{
/// <summary>
/// This class will continually poll a SQS queue for more messages from a dead letter queue. If a mes... | 138 |
aws-lambda-dotnet | aws | C# | namespace Amazon.Lambda.TestTool.Runtime
{
/// <summary>
/// The information used to execute the Lambda function within the test tool
/// </summary>
public class ExecutionRequest
{
/// <summary>
/// The container for the holds a reference to the code executed for the Lambda functi... | 29 |
aws-lambda-dotnet | aws | C# | using System;
using System.Runtime.Serialization;
namespace Amazon.Lambda.TestTool.Runtime
{
/// <summary>
/// The class represents the output of an executed Lambda function.
/// </summary>
public class ExecutionResponse
{
/// <summary>
/// The return data from a Lambda function.... | 32 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Reflection;
using System.Runtime.Loader;
using Microsoft.Extensions.DependencyModel;
using Microsoft.Extensions.DependencyModel.Resolution;
namespace Amazon.Lambda.TestTool.Runtime
{
public class LambdaAssemblyLoad... | 185 |
aws-lambda-dotnet | aws | C# | using System.Collections.Generic;
namespace Amazon.Lambda.TestTool.Runtime
{
/// <summary>
/// This class represents the config info for the available lambda functions gathered from the aws-lambda-tools-defaults.json or similiar files and possibly
/// an associated CloudFormation template.
/// </su... | 16 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections;
using System.IO;
using System.Collections.Generic;
using System.Text.Json;
using YamlDotNet.RepresentationModel;
namespace Amazon.Lambda.TestTool.Runtime
{
/// <summary>
/// This class handles getting the configuration information from aws-lambda-tools-defaults.json ... | 374 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Amazon.Lambda.TestTool.Runtime.LambdaMocks;
namespace Amazon.Lambda.TestTool... | 268 |
aws-lambda-dotnet | aws | C# | using System;
using System.Reflection;
using Amazon.Lambda.TestTool.Runtime;
using Amazon.Lambda.Core;
namespace Amazon.Lambda.TestTool.Runtime
{
/// <summary>
/// The abstraction above the code that will be called when during a Lambda invocation.
/// </summary>
public class LambdaFunction
{
... | 33 |
aws-lambda-dotnet | aws | C# | using System.Collections.Generic;
namespace Amazon.Lambda.TestTool.Runtime
{
public class LambdaFunctionInfo
{
/// <summary>
/// Display friendly name of the Lambda Function.
/// </summary>
public string Name { get; set; }
/// <summary>
/// The Lambda... | 19 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Net;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Amazon.Lambda.TestTool.Services;
namespace Amazon.Lambda.TestTool.Runtime
{
public interface ILocalLambdaRuntime : IDispos... | 169 |
aws-lambda-dotnet | aws | C# | using System;
using Amazon.Lambda.Core;
namespace Amazon.Lambda.TestTool.Runtime.LambdaMocks
{
public class LocalLambdaContext : ILambdaContext
{
public string AwsRequestId { get; set; }
public IClientContext ClientContext { get; set; }
public string FunctionName { get; set; }
... | 20 |
aws-lambda-dotnet | aws | C# | using System.Text;
using Amazon.Lambda.Core;
namespace Amazon.Lambda.TestTool.Runtime.LambdaMocks
{
public class LocalLambdaLogger : ILambdaLogger
{
private StringBuilder _buffer = new StringBuilder();
public void Log(string message)
{
_buffer.Append(message);
... | 25 |
aws-lambda-dotnet | aws | C# | namespace Amazon.Lambda.TestTool.SampleRequests
{
public class LambdaRequest
{
public string Name { get; set; }
public string Group { get; set; }
public string Filename { get; set; }
}
} | 9 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml.Linq;
namespace Amazon.Lambda.TestTool.SampleRequests
{
/// <summary>
/// This class manages the sample Lambda input requests. This includes the precanned requests and saved requests.
/// </summary>
pub... | 149 |
aws-lambda-dotnet | aws | C# | using Amazon.Runtime;
using Amazon.Runtime.CredentialManagement;
using Amazon.SQS;
using Amazon.SQS.Model;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Amazon.Lambda.TestTool.Services
{
public class AWSServiceImpl : IAWSService
{
public IList<string> ListProfiles()
... | 113 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Amazon.SQS.Model;
namespace Amazon.Lambda.TestTool.Services
{
public interface IAWSService
{
IList<string> ListProfiles();
Task<IList<string>> ListQueuesAsync(string profile, string region);
Task<M... | 22 |
aws-lambda-dotnet | aws | C# | namespace Amazon.Lambda.TestTool.BlazorTester
{
public class Constants
{
public const int DEFAULT_PORT = 5050;
public const string DEFAULT_HOST = "localhost";
#if NETCOREAPP3_1
public const string PRODUCT_NAME = "AWS .NET Core 3.1 Mock Lambda Test Tool";
#elif NET5_0
public cons... | 34 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Amazon.Lambda.Tes... | 23 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.TestTool.BlazorTester.Services;
using Blazored.Modal;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using System;
using System.Diagnostics;
us... | 119 |
aws-lambda-dotnet | aws | C# | using System;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Amazon.Lambda.TestTool.BlazorTester.Services;
using Microsoft.AspNetCore.Mvc;
namespace Amazon.Lambda.TestTool.BlazorTester.Controllers
{
#if NET6_0_OR_GREATER
public class RuntimeApiController : ControllerBase
{
priv... | 105 |
aws-lambda-dotnet | aws | C# | namespace Amazon.Lambda.TestTool.BlazorTester.Models
{
public class QueueItem
{
public string QueueUrl { get; set; }
public string QueueName => this.QueueUrl.Substring(this.QueueUrl.LastIndexOf('/') + 1);
}
} | 8 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading;
namespace Amazon.Lambda.TestTool.BlazorTester.Services
{
public interface IRuntimeApiDataStore
{
EventContainer QueueEvent(string eventBody);
IReadOnlyList<I... | 270 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.TestTool.BlazorTester.Services;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace Amazon.Lambda.TestTool.Blazor... | 185 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.TestTool.BlazorTester.Services;
using System.Collections.Generic;
using System.Linq;
using Xunit;
namespace Amazon.Lambda.TestTool.BlazorTester.Tests
{
public class RuntimeApiDataStoreTests
{
[Fact]
public void ActivateEvents()
{
var dataStore = new Runti... | 153 |
aws-lambda-dotnet | aws | C# | namespace Amazon.Lambda.TestTool.Tests.NET6
{
public class SourceGeneratorTests
{
[Fact]
public void SourceGeneratorInputAndOutput()
{
var runConfiguration = new TestToolStartup.RunConfiguration
{
Mode = TestToolStartup.RunConfiguration.RunMode.Tes... | 34 |
aws-lambda-dotnet | aws | C# | global using Xunit; | 1 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection.PortableExecutable;
using System.Threading.Tasks;
using Amazon.Lambda.TestTool.Services;
using Xunit;
using Amazon.SQS;
using Amazon.SQS.Model;
using Newtonsoft.Json;
namespace Amazon.Lambda.TestTool.Tests
{
public class A... | 97 |
aws-lambda-dotnet | aws | C# | using Xunit;
namespace Amazon.Lambda.TestTool.Tests
{
public class CommandLineParserTests
{
[Fact]
public void AllValuesGetSet()
{
var options = CommandLineOptions.Parse(new string[] {"--help", "--host", "example.com", "--port", "1111", "--no-launch-window",
... | 92 |
aws-lambda-dotnet | aws | C# | using System;
using Xunit;
using Amazon.Lambda.TestTool;
using Amazon.Lambda.TestTool.Runtime;
using Amazon.Lambda.TestTool.Runtime.LambdaMocks;
namespace Amazon.Lambda.TestTool.Tests
{
public class ConsoleCaptureTests
{
[Fact]
public void CaptureStandardOut()
{
var logg... | 41 |
aws-lambda-dotnet | aws | C# | using System;
using System.IO;
using Xunit;
using Amazon.Lambda.TestTool.Runtime;
using Amazon.Lambda.AspNetCoreServer.Internal;
using System.Collections.Generic;
namespace Amazon.Lambda.TestTool.Tests
{
public class DefaultsFileParseTests
{
[Fact]
public void LambdaFunctionWithNoName()
... | 303 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection.PortableExecutable;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Lambda.TestTool.Runtime;
using Xunit;
using Amazon.SQS;
using Amazon.SQS.Model;
namespace Amazon.Lambda.TestTool.Tests
{
public class D... | 92 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
using Xunit;
using Amazon.Lambda.TestTool.Runtime;
using System.Threading.Tasks;
namespace Amazon.Lambda.TestTool.Tests
{
public class InvokeFunctionTests
{
[Fact]
public async Task StringToStringWithContextTest()
{
... | 193 |
aws-lambda-dotnet | aws | C# | using System;
using System.IO;
using Xunit;
using Amazon.Lambda.TestTool.Runtime;
namespace Amazon.Lambda.TestTool.Tests
{
public class LoadLambdaFunctionTests
{
[Fact]
public void LoadInstanceMethodWithAssemblySerializer()
{
var configFile = TestUtils.GetLambdaFunctionS... | 59 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Xunit;
using Amazon.Lambda.TestTool;
namespace Amazon.Lambda.TestTool.Tests
{
public class NoUiStartupTests
{
[Fact]
public void DirectFunctionCallFromConfig()
{
var runCo... | 109 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
using Xunit;
using Amazon.Lambda.TestTool.SampleRequests;
namespace Amazon.Lambda.TestTool.Tests
{
public class SampleRequestTests
{
[Theory]
[InlineData("SavedRequests@foo.json", "foo")]
[InlineData("S3@foo.json", ... | 31 |
aws-lambda-dotnet | aws | C# | using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
using Amazon.Runtime.CredentialManagement;
using Amazon.SQS;
using Amazon.SQS.Model;
namespace Amazon.Lambda.TestTool.Tests
{
public static class TestUtils
{
public static string TestProfile
... | 89 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.Core;
using Amazon.Lambda.Serialization.SystemTextJson;
using System.Text.Json.Serialization;
[assembly: LambdaSerializer(typeof(SourceGeneratorLambdaJsonSerializer<SourceGeneratorExample.CustomTypesSerializerContext>))]
namespace SourceGeneratorExample;
[JsonSerializable(typeof(Input))]
[JsonSer... | 40 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AspNetCoreAPIExample
{
public interface IFakeDependency
{
}
public class FakeDependency : IFakeDependency
{
}
}
| 17 |
aws-lambda-dotnet | aws | C# | using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace AspNetCoreAPIExample
{
/// <summary>
/// This class extends from APIGatewayProxyFunction which contains the method FunctionHandlerAsync which is the
/// actual L... | 53 |
aws-lambda-dotnet | aws | C# | using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace AspNetCoreAPIExample
{
/// <summary>
/// The Main function can be used to run the ASP.NET Core application locally using the Kestrel webserver.
/// </summary>
... | 27 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
usin... | 58 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace AspNetCoreAPIExample.Controllers
{
[Route("api/[controller]")]
public class ValuesController : ControllerBase
{
IFakeDependency _fakeDependency;
public... | 52 |
aws-lambda-dotnet | aws | C# | using System;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
namespace FunctionSignatureExamples
{
public class AsyncMethods
{
public Task TaskWithNoResult(string input, ILambdaContext context)
{
context.Logger.LogLine("Calling TaskWithNoResult"... | 26 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
namespace FunctionSignatureExamples
{
public class ErrorFunctions
{
public void SyncThrowException()
{
throw new ApplicationException("Test Exception");
... | 28 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Amazon.Lambda.S3Events;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Js... | 56 |
aws-lambda-dotnet | aws | C# | using Amazon.Lambda.Core;
namespace FunctionSignatureExamples
{
public static class StaticMethods
{
public static string TheStaticMethod(string input, ILambdaContext context)
{
context.Logger.LogLine("Calling TheStaticMethodß");
return "TheStaticMethod-" + input; ... | 15 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Amazon.Lambda.S3Events;
using Amazon.S3;
using Amazon.S3.Util;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerialize... | 60 |
aws-lambda-dotnet | aws | C# | namespace DotNetServerless.Lambda
{
public class Program
{
public static void Main(string[] args)
{
}
}
}
| 10 |
aws-lambda-dotnet | aws | C# | using System.IO;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace DotNetServerless.Lambda
{
public class Startup
{
public static IServiceCollection BuildContainer()
{
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.Ge... | 28 |
aws-lambda-dotnet | aws | C# | using System;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.Core;
using Microsoft.Extensions.DependencyInjection;
namespace DotNetServerless.Lambda.Functions
{
public class CreateItemFunction
{
private readonly IServiceProvider _serviceProvider;
public CreateItemF... | 31 |
aws-lambda-dotnet | aws | C# | using System;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.Core;
using Microsoft.Extensions.DependencyInjection;
namespace DotNetServerless.Lambda.Functions
{
public class GetItemFunction
{
private readonly IServiceProvider _serviceProvider;
public Ge... | 32 |
aws-lambda-dotnet | aws | C# | using System;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.Core;
using Microsoft.Extensions.DependencyInjection;
namespace DotNetServerless.Lambda.Functions
{
public class UpdateItemFunction
{
private readonly IServiceProvider _serviceProvider;
public... | 32 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Amazon.Lambda.APIGatewayEvents;
using Amazon;
using Newtonsoft.Json;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET clas... | 41 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Amazon.Lambda.APIGatewayEvents;
using Amazon;
using Newtonsoft.Json;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET clas... | 41 |
aws-lambda-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
namespace ToUpperFunc
{
public class Function
{
/// <summary>
/// A simple function that takes a string and does a ToUpper
/// </summary... | 46 |
aws-logging-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
namespace ConsoleSample
{
public class Program
{
public static void Main(string[] args)
{
var config = new AWS.Logger.AWSLoggerConfig("AspNetCore.... | 28 |
aws-logging-dotnet | aws | C# | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfigur... | 20 |
aws-logging-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace WebSample
{
public class Program
{
... | 32 |
aws-logging-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
usin... | 67 |
aws-logging-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
namespace WebSample.Pages
{
public class IndexModel : PageModel
{
ILogger<IndexModel> Logger... | 26 |
aws-logging-dotnet | aws | C# | using Amazon.Runtime;
using AWS.Logger.Log4net;
using log4net;
using log4net.Layout;
using log4net.Repository.Hierarchy;
using System;
using System.Linq;
namespace BasicAWSCredentialsConfigurationExample
{
public class Program
{
private static readonly ILog log = LogManager.GetLogger(nameof(Program)... | 80 |
aws-logging-dotnet | aws | C# | using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BasicAWSCredentialsConfigurationExample"... | 36 |
aws-logging-dotnet | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using log4net;
using log4net.Config;
namespace ConfigExample
{
class Program
{
static void Main(string[] args)
{
// Log4net is configured in the log4net.config whi... | 26 |
aws-logging-dotnet | aws | C# | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("... | 37 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.