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 System; using System.Linq; using System.Collections.Generic; using System.Text; using Microsoft.Extensions.DependencyInjection; using Amazon.Lambda.Core; namespace TestServerlessApp { public class SimpleCalculator_Add_Generated { private readonly ServiceProvider serviceProvider; publi...
111
aws-lambda-dotnet
aws
C#
using System; using System.Linq; using System.Collections.Generic; using System.Text; using Microsoft.Extensions.DependencyInjection; using Amazon.Lambda.Core; namespace TestServerlessApp { public class SimpleCalculator_DivideAsync_Generated { private readonly ServiceProvider serviceProvider; ...
111
aws-lambda-dotnet
aws
C#
using System; using System.Linq; using System.Collections.Generic; using System.Text; using Microsoft.Extensions.DependencyInjection; using Amazon.Lambda.Core; namespace TestServerlessApp { public class SimpleCalculator_Multiply_Generated { private readonly ServiceProvider serviceProvider; ...
109
aws-lambda-dotnet
aws
C#
using System; using System.Linq; using System.Collections.Generic; using System.Text; using Microsoft.Extensions.DependencyInjection; using Amazon.Lambda.Core; namespace TestServerlessApp { public class SimpleCalculator_Pi_Generated { private readonly ServiceProvider serviceProvider; public...
56
aws-lambda-dotnet
aws
C#
using System; using System.Linq; using System.Collections.Generic; using System.Text; using Microsoft.Extensions.DependencyInjection; using Amazon.Lambda.Core; namespace TestServerlessApp { public class SimpleCalculator_Randoms_Generated { private readonly ServiceProvider serviceProvider; p...
55
aws-lambda-dotnet
aws
C#
using System; using System.Linq; using System.Collections.Generic; using System.Text; using Microsoft.Extensions.DependencyInjection; using Amazon.Lambda.Core; namespace TestServerlessApp { public class SimpleCalculator_Random_Generated { private readonly ServiceProvider serviceProvider; pu...
55
aws-lambda-dotnet
aws
C#
using System; using System.Linq; using System.Collections.Generic; using System.Text; using Microsoft.Extensions.DependencyInjection; using Amazon.Lambda.Core; namespace TestServerlessApp { public class SimpleCalculator_Subtract_Generated { private readonly ServiceProvider serviceProvider; ...
101
aws-lambda-dotnet
aws
C#
using System; using System.Linq; using System.Collections.Generic; using System.Text; using Amazon.Lambda.Core; namespace TestServerlessApp { public class TaskExample_TaskReturn_Generated { private readonly TaskExample taskExample; public TaskExample_TaskReturn_Generated() { ...
41
aws-lambda-dotnet
aws
C#
using System; using System.Linq; using System.Collections.Generic; using System.Text; using Amazon.Lambda.Core; namespace TestServerlessApp { public class VoidExample_VoidReturn_Generated { private readonly VoidExample voidExample; public VoidExample_VoidReturn_Generated() { ...
41
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.Dynamic; using System.IO; using Amazon.Lambda.Annotations.APIGateway; using Amazon.Lambda.Annotations.SourceGenerator; using Amazon.Lambda.Annotations.SourceGenerator.Diagnostics; using Amazon.Lambda.Annotations.SourceGenerator.FileIO; using Amazon.Lambda.Ann...
836
aws-lambda-dotnet
aws
C#
using System.Collections.Generic; using System.IO; using Amazon.Lambda.Annotations.SourceGenerator.FileIO; namespace Amazon.Lambda.Annotations.SourceGenerators.Tests.WriterTests { public class InMemoryFileManager : IFileManager { private readonly IDictionary<string, string> _cacheContent; publ...
27
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using Amazon.Lambda.Annotations.SourceGenerator.Writers; using Newtonsoft.Json.Linq; using Xunit; namespace Amazon.Lambda.Annotations.SourceGenerators.Tests.WriterTests { public class JsonWriterTests { private const string SampleJsonSt...
164
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations.SourceGenerator; using Amazon.Lambda.Annotations.SourceGenerator.FileIO; using Moq; using Xunit; namespace Amazon.Lambda.Annotations.SourceGenerators.Tests.WriterTests { /// <summary> /// Tests for <see cref="ProjectFileHandler"/> /// </summary> public class ProjectFi...
101
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using Amazon.Lambda.Annotations.SourceGenerator.Writers; using Xunit; using YamlDotNet.RepresentationModel; namespace Amazon.Lambda.Annotations.SourceGenerators.Tests.WriterTests { public class YamlWriterTests { const string yamlConten...
203
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Linq; using System.Net; using System.Reflection; using System.Text; using System.Threading.Tasks; using Amazon.Lambda.APIGatewayEvents; using Amazon.Lambda.TestUtilities; using Newtonsoft.Json; using Newtonso...
314
aws-lambda-dotnet
aws
C#
using System; using System.IO; using System.IO.Compression; using System.Linq; using System.Net; using System.Reflection; using System.Text; using System.Threading.Tasks; using Amazon.Lambda.ApplicationLoadBalancerEvents; using Amazon.Lambda.TestUtilities; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using T...
254
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Linq; using System.Net; using System.Reflection; using System.Text; using System.Text.Encodings.Web; using System.Text.Json; using System.Text.Json.Nodes; using System.Threading.Tasks; using Amazon.Lambda.APIG...
518
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.Threading.Tasks; using Amazon.Lambda.Serialization.SystemTextJson; using Amazon.Lambda.APIGat...
113
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Linq; using System.Net; using System.Reflection; using System.Text; using System.Threading.Tasks; using Amazon.Lambda.APIGatewayEvents; using Amazon.Lambda.TestUtilities; using Newtonsoft.Json; using Newtonso...
57
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.Text; using Amazon.Lambda.AspNetCoreServer.Internal; using Microsoft.AspNetCore.Http.Features; using Xunit; namespace Amazon.Lambda.AspNetCoreServer.Test { public class UtilitiesTest { [Theory] [InlineData(null, null)] [In...
34
aws-lambda-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-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using System.Text; using Xunit; using System.Linq; using Amazon.Lambda; namespace Amazon.Lambda.Tests { public class CoreTest { [Fact] public void TestLambdaLogger() { // verify that LambdaLogger logs to Conso...
40
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Logging.AspNetCore.Tests; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using Xunit; namespace Amazon.Lambda.Tests { public class LoggingTests { private ...
582
aws-lambda-dotnet
aws
C#
using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Amazon.Lambda.Logging.AspNetCore.Tests { public class TestLoggerFactory : ILoggerFactory { private ILoggerProvider _provider; public void AddProvide...
43
aws-lambda-dotnet
aws
C#
using Amazon.IdentityManagement; using Amazon.IdentityManagement.Model; using Amazon.Lambda.Model; using Amazon.S3; using Amazon.S3.Model; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Amazon.Lam...
347
aws-lambda-dotnet
aws
C#
using Amazon.IdentityManagement; using Amazon.IdentityManagement.Model; using Amazon.Lambda.Model; using Amazon.S3; using Amazon.S3.Model; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Threading; using System.Threadi...
119
aws-lambda-dotnet
aws
C#
using Amazon.IdentityManagement; using Amazon.IdentityManagement.Model; using Amazon.Lambda.Model; using Amazon.S3; using Amazon.S3.Model; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Threading; using System.Threadi...
119
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
191
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
92
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using Amazon.Lambda.RuntimeSupport.Helpers; using Amazon.Lambda.RuntimeSupport.UnitTests.TestHelpers; using Xunit; namespace Amazon.Lambda.RuntimeSupport.UnitTests { public class FileDescriptorLogStreamTests ...
194
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
438
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
686
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
99
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
263
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.Globalization; using System.IO; using Xunit; namespace Amazon.Lambda.RuntimeSupport.UnitTests { public class LambdaContextTests { private readonly TestEnvironmentVariables _environmentVariables; public LambdaContextTests() ...
40
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
49
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text.Json; using Xunit; namespace Amazon.Lambda.RuntimeSupport.UnitTests { public class LambdaExceptionHandlingTests { [Fact] public void WriteJsonForUserCodeException() { Exception exception ...
64
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
56
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
50
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
50
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
75
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
26
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
49
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace Amazon.Lambda.RuntimeSupport.UnitTests.TestHelpers { public class TestFileStream : FileStream { private Action<byte[], int, int> WriteAction { get; } public TestFileStream(Action<byte[], int, int> wri...
32
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
116
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
71
aws-lambda-dotnet
aws
C#
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lic...
140
aws-lambda-dotnet
aws
C#
using System.Text.Json.Serialization; using Amazon.Lambda.APIGatewayEvents; namespace CustomRuntimeAspNetCoreMinimalApiCustomSerializerTest; [JsonSerializable(typeof(WeatherForecast))] [JsonSerializable(typeof(APIGatewayHttpApiV2ProxyRequest))] [JsonSerializable(typeof(APIGatewayHttpApiV2ProxyResponse))] public pa...
11
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Serialization.SystemTextJson; using CustomRuntimeAspNetCoreMinimalApiCustomSerializerTest; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckl...
34
aws-lambda-dotnet
aws
C#
namespace CustomRuntimeAspNetCoreMinimalApiCustomSerializerTest { public class WeatherForecast { public DateTime Date { get; set; } public int TemperatureC { get; set; } public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); public string? Summary { get; set; } } }
13
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Core; using Microsoft.AspNetCore.Mvc; namespace CustomRuntimeAspNetCoreMinimalApiCustomSerializerTest.Controllers { [ApiController] [Route("[controller]")] public class LoggerTestController : ControllerBase { [HttpGet()] public long Get() { var...
65
aws-lambda-dotnet
aws
C#
using Microsoft.AspNetCore.Mvc; namespace CustomRuntimeAspNetCoreMinimalApiCustomSerializerTest.Controllers { [ApiController] [Route("[controller]")] public class WeatherForecastController : ControllerBase { private static readonly string[] Summaries = new[] { "Freezing", "Braci...
33
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Serialization.SystemTextJson; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Service...
30
aws-lambda-dotnet
aws
C#
namespace CustomRuntimeAspNetCoreMinimalApiTest { public class WeatherForecast { public DateTime Date { get; set; } public int TemperatureC { get; set; } public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); public string? Summary { get; set; } } }
13
aws-lambda-dotnet
aws
C#
using Microsoft.AspNetCore.Mvc; using Amazon.Lambda.Core; namespace CustomRuntimeAspNetCoreMinimalApiTest.Controllers { [ApiController] [Route("[controller]")] public class LoggerTestController : ControllerBase { [HttpGet()] public long Get() { var lambdaContext =...
65
aws-lambda-dotnet
aws
C#
using Microsoft.AspNetCore.Mvc; namespace CustomRuntimeAspNetCoreMinimalApiTest.Controllers { [ApiController] [Route("[controller]")] public class WeatherForecastController : ControllerBase { private static readonly string[] Summaries = new[] { "Freezing", "Bracing", "Chilly", "...
33
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Core; using Amazon.Lambda.RuntimeSupport; using Amazon.Lambda.Serialization.SystemTextJson; using System; using System.IO; using System.Net.Http; using System.Net.Sockets; using System.Reflection; using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Thread...
469
aws-lambda-dotnet
aws
C#
using System.IO; using System.Text.Json.Serialization; using Xunit; using Amazon.Lambda.Serialization.SystemTextJson; using Amazon.Lambda.APIGatewayEvents; using System; using Amazon.Lambda.Core; using System.Text; using System.Text.Json; using Amazon.Lambda.S3Events; using Amazon.Lambda.CloudWatchEvents.BatchEven...
343
aws-lambda-dotnet
aws
C#
using System.IO; using Xunit; using Amazon.Lambda.Serialization.SystemTextJson; using Newtonsoft.Json.Linq; namespace EventsTests31 { public class TestResponseCasing { [Fact] public void TestPascalCase() { var serializer = new DefaultLambdaJsonSerializer(); va...
55
aws-lambda-dotnet
aws
C#
#pragma warning disable 618 namespace Amazon.Lambda.Tests { using Amazon.Lambda.APIGatewayEvents; using Amazon.Lambda.ApplicationLoadBalancerEvents; using Amazon.Lambda.CloudWatchEvents.BatchEvents; using Amazon.Lambda.CloudWatchEvents.ECSEvents; using Amazon.Lambda.CloudWatchEvents.ScheduledEvents;...
3,230
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
150
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
90
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
418
aws-lambda-dotnet
aws
C#
/* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ /* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is ...
153
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
58
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
37
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
33
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
26
aws-lambda-dotnet
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fi...
35
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using System.Text; using Xunit; using System.Linq; using System.Threading.Tasks; using Amazon.Lambda.TestUtilities; using Amazon.Lambda.PowerShellHost; using static Amazon.Lambda.PowerShellTests.TestUtilites; namespace Amazon.Lambda.PowerShellTests ...
128
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using System.Text; using Xunit; using System.Linq; using System.Threading.Tasks; using Amazon.Lambda.TestUtilities; using Amazon.Lambda.PowerShellHost; using static Amazon.Lambda.PowerShellTests.TestUtilites; namespace Amazon.Lambda.PowerShellTests ...
81
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using System.Text; using Xunit; using System.Linq; using System.Threading.Tasks; using Amazon.Lambda.TestUtilities; using Amazon.Lambda.PowerShellHost; using static Amazon.Lambda.PowerShellTests.TestUtilites; using Newtonsoft.Json; using Newtonsoft.Jso...
196
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.IO; using System.Text; namespace Amazon.Lambda.PowerShellTests { public static class TestUtilites { public static string ConvertToString(Stream ms) { using (var reader = new StreamReader(ms)) { ...
24
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace TestFunction { public class Function { [Amazon.Lambda.Core.LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))] public string ToUpper(string input) { ...
18
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace TestFunction { public class ValidateHandlerFunctionSignatures : BaseValidateHandlerFunctionSignatures { public string NoParameters() { return null; } public...
34
aws-lambda-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-lambda-dotnet
aws
C#
using Amazon.Lambda.Core; using Amazon.Lambda.Serialization.Json; using Newtonsoft.Json; using AmazonSerializer = Amazon.Lambda.Serialization.Json; namespace FSharpJsonSerializer { public class FSharpJsonSerializer : AmazonSerializer.JsonSerializer { private static JsonConverter converter = new Fable.J...
17
aws-lambda-dotnet
aws
C#
using System; using Xunit; using TestFunctionFSharp; using Amazon.Lambda.TestUtilities; using Microsoft.FSharp.Core; namespace TestFunctionCSharp { public class CSharpClassUsingFSharpTypeTest { [Fact] public void GetPaymentMethod_should_return_None_when_given_Garbage() { ...
22
aws-lambda-dotnet
aws
C#
using System; using Xunit; using Amazon.Lambda.Serialization.Json; using System.Collections.Generic; using Newtonsoft.Json; using AmazonJsonSerializer = Amazon.Lambda.Serialization.Json.JsonSerializer; public class JsonSerializerTest { [Fact] public void JsonSerializerDoesntThrowWithNullArg () { IE...
18
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.AspNetCoreServer.Hosting.Internal; using Amazon.Lambda.AspNetCoreServer.Internal; using Amazon.Lambda.APIGatewayEvents; using Amazon.Lambda.TestUtilities; using Amazon.Lambda.Serialization.SystemTextJson; using Microsoft.AspNetCore.Hosting.Server; if (args.Length != 2) { throw new Exception("In...
61
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 PowerShellScriptsAsFunctions { public class Function : Amazon.Lambda.PowerShellHost.PowerShellFunctionHost { public Function(string script) : base(sc...
23
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Core; [assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]
3
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.Linq; using System.Numerics; using System.Text.Json; using System.Threading; using Amazon.Lambda.Annotations; using Amazon.Lambda.Annotations.APIGateway; using Amazon.Lambda.APIGatewayEvents; using Amazon.Lambda.Core; namespace TestServerlessApp { public...
74
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations; using Amazon.Lambda.Annotations.APIGateway; using Amazon.Lambda.Core; using System.Threading.Tasks; namespace TestServerlessApp { public class CustomizeResponseExamples { [LambdaFunction(PackageType = LambdaPackageType.Image)] [RestApi(LambdaHttpMethod.Get, "...
71
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations; using Amazon.Lambda.Core; using System.Threading.Tasks; namespace TestServerlessApp { public class DynamicExample { [LambdaFunction(PackageType = LambdaPackageType.Image)] public dynamic DynamicReturn(string text, ILambdaContext context) { ...
24
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Amazon.Lambda.Annotations; using Amazon.Lambda.Annotations.APIGateway; using Amazon.Lambda.APIGatewayEvents; using Amazon.Lambda.Core; namespace TestServerlessApp { public class Greeter { [Lambda...
47
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations; using Amazon.Lambda.Core; namespace TestServerlessApp { public class IntrinsicExample { [LambdaFunction(PackageType = LambdaPackageType.Image)] public void HasIntrinsic(string text, ILambdaContext context) { context.Logger.LogLine(text); ...
15
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations; using Amazon.Lambda.Annotations.APIGateway; using Amazon.Lambda.Core; namespace TestServerlessApp { public class NullableReferenceTypeExample { [LambdaFunction(PackageType = LambdaPackageType.Image)] [HttpApi(LambdaHttpMethod.Get, "/nullableheaderhttpapi")] ...
17
aws-lambda-dotnet
aws
C#
namespace TestServerlessApp { internal class PlaceholderClass { // This type exists because some of the source generator tests use fake CS files to simulate errors. // But there needs to be at least one real CS file in the test for the generator to determine the project // directory. ...
10
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.Threading.Tasks; using Amazon.Lambda.Core; using Amazon.Lambda.APIGatewayEvents; using Amazon.Lambda.Annotations; using Amazon.Lambda.Annotations.APIGateway; using TestServerlessApp.Services; namespace TestServerlessApp { public class SimpleCalculator ...
93
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations; using Microsoft.Extensions.DependencyInjection; using System; using System.Collections.Generic; using System.Security.Cryptography.X509Certificates; using System.Text; using TestServerlessApp.Services; namespace TestServerlessApp { [LambdaStartup] public class Startup { ...
20
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations; using Amazon.Lambda.Core; using System.Threading.Tasks; namespace TestServerlessApp { public class TaskExample { [LambdaFunction(PackageType = LambdaPackageType.Image)] public async Task TaskReturn(string text, ILambdaContext context) { co...
17
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations; using Amazon.Lambda.Core; namespace TestServerlessApp { public class VoidExample { [LambdaFunction(PackageType = LambdaPackageType.Image)] public void VoidReturn(string text, ILambdaContext context) { context.Logger.LogLine(text); ...
15
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations; using Amazon.Lambda.Annotations.APIGateway; using Amazon.Lambda.Core; namespace TestServerlessApp.FromScratch { public class NoApiGatewayEventsReference { [LambdaFunction(PackageType = LambdaPackageType.Image)] [HttpApi(LambdaHttpMethod.Get, "/{text}")] ...
17
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations; using Amazon.Lambda.Annotations.APIGateway; using Amazon.Lambda.Core; namespace TestServerlessApp.FromScratch { public class NoSerializerAttributeReference { [LambdaFunction(PackageType = LambdaPackageType.Image)] public string ToUpper(string text) { ...
16
aws-lambda-dotnet
aws
C#
using System; using System.Text.RegularExpressions; namespace TestServerlessApp.Services { public interface ISimpleCalculatorService { int Add(int x, int y); int Subtract(int x, int y); int Multiply(int x, int y); int Divide(int x, int y); double PI(); } publ...
42
aws-lambda-dotnet
aws
C#
using Amazon.Lambda.Annotations; using Amazon.Lambda.Core; namespace TestServerlessApp.Sub1 { public class Functions { [LambdaFunction(ResourceName = "ToUpper", PackageType = LambdaPackageType.Image)] public string ToUpper(string text) { return text.ToUpper(); } ...
15
aws-lambda-dotnet
aws
C#
using System.Net.Http; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; namespace TestServerlessApp.IntegrationTests { [Collection("Integration Tests")] public class ComplexCalculator { private readonly IntegrationTestContextFixture...
42
aws-lambda-dotnet
aws
C#
using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using Xunit; namespace TestServerlessApp.IntegrationTests { [Collection("Integration Tests")] public class Greeter { private readonly IntegrationTestContextFixture _fixture; ...
49
aws-lambda-dotnet
aws
C#
using System.Collections.Generic; using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using Amazon.CloudFormation; using Amazon.CloudWatchLogs; using Amazon.Lambda; using Amazon.S3; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using TestServerlessApp.IntegrationTests.Helper...
94