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-sam-cli | aws | C# | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net.Http;
using Newtonsoft.Json;
using Amazon.Lambda.Core;
using Amazon.Lambda.APIGatewayEvents;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializ... | 51 |
aws-sam-cli-app-templates | aws | C# | using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.Core;
using Amazon.Lambda.RuntimeSupport;
using Amazon.Lambda.Serialization.SystemTextJson;
... | 69 |
aws-sam-cli-app-templates | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text.Json;
using Xunit;
using Amazon.Lambda.TestUtilities;
using Amazon.Lambda.APIGatewayEvents;
namespace HelloWorld.Tests
{
public class FunctionTest
{
private static readonly ... | 57 |
aws-sam-cli-app-templates | aws | C# | using System.Text.Json;
using Amazon.Lambda.Core;
using Amazon.Lambda.CloudWatchEvents;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]
namespace {{cookiecu... | 28 |
aws-sam-cli-app-templates | aws | C# | using Xunit;
using Amazon.Lambda.Core;
using Amazon.Lambda.TestUtilities;
using Amazon.Lambda.CloudWatchEvents;
namespace {{cookiecutter.project_name}}.Tests;
public class FunctionTest
{
[Fact]
public void TestToUpperFunction()
{
// Invoke the lambda function and confirm the string was upper case... | 34 |
aws-sam-cli-app-templates | aws | C# | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text.Json;
using Amazon.Lambda.Core;
using Amazon.Lambda.APIGatewayEvents;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSeriali... | 50 |
aws-sam-cli-app-templates | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text.Json;
using Xunit;
using Amazon.Lambda.TestUtilities;
using Amazon.Lambda.APIGatewayEvents;
namespace HelloWorld.Tests
{
public class FunctionTest
{
private static readonly ... | 58 |
aws-sam-cli-app-templates | aws | C# | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text.Json;
using Amazon.Lambda.Core;
using Amazon.Lambda.APIGatewayEvents;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSeriali... | 50 |
aws-sam-cli-app-templates | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text.Json;
using Xunit;
using Amazon.Lambda.TestUtilities;
using Amazon.Lambda.APIGatewayEvents;
namespace HelloWorld.Tests
{
public class FunctionTest
{
private static readonly ... | 58 |
aws-sam-cli-app-templates | aws | C# | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text.Json;
using Amazon.Lambda.Core;
using Amazon.Lambda.APIGatewayEvents;
{%- if cookiecutter["Powertools for AWS Lambda (.NET) Tracing"] == "enabled"%}
using Amazon.XRay.Recorder.Handlers.AwsSdk;
using A... | 100 |
aws-sam-cli-app-templates | aws | C# | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text.Json;
using Xunit;
using Amazon.Lambda.TestUtilities;
using Amazon.Lambda.APIGatewayEvents;
namespace HelloWorld.Tests
{
public class FunctionTest
{
private static readonly HttpClient client =... | 58 |
aws-sam-cli-app-templates | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Text.Json;
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.
[a... | 72 |
aws-sam-cli-app-templates | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
using Moq;
using Amazon.Lambda;
using Amazon.Lambda.Core;
using Amazon.Lambda.TestUtilities;
using Amazon.Lambda.S3Events;
using Amazon;
using Amazon.S3;
using Amazon.S3.Model;
using A... | 77 |
aws-sam-cli-app-templates | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJson... | 32 |
aws-sam-cli-app-templates | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Xunit;
using Amazon.Lambda.Core;
using Amazon.Lambda.TestUtilities;
using {{cookiecutter.project_name}};
namespace {{cookiecutter.project_name}}.Tests
{
public class FunctionTest
{
[Fact]
pu... | 29 |
aws-sam-cli-app-templates | aws | C# | using Amazon.Lambda.Core;
using Amazon.Lambda.SNSEvents;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]
namespace {{cookiecutter.project_name}};
public cl... | 45 |
aws-sam-cli-app-templates | aws | C# | using Xunit;
using Amazon.Lambda.TestUtilities;
using Amazon.Lambda.SNSEvents;
namespace {{cookiecutter.project_name}}.Tests;
public class FunctionTest
{
[Fact]
public async Task TestSQSEventLambdaFunction()
{
var snsEvent = new SNSEvent
{
Records = new List<SNSEvent.SNSRecord>... | 37 |
aws-sam-cli-app-templates | aws | C# | using Amazon.Lambda.Core;
using Amazon.Lambda.SQSEvents;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]
namespace {{cookiecutter.project_name}}
{
publi... | 51 |
aws-sam-cli-app-templates | aws | C# | using Xunit;
using Amazon.Lambda.TestUtilities;
using Amazon.Lambda.SQSEvents;
using {{cookiecutter.project_name}};
namespace {{cookiecutter.project_name}}.Tests
{
public class FunctionTest
{
[Fact]
public async Task TestSQSEventLambdaFunction()
{
var sqsEvent = new SQSEven... | 38 |
aws-sam-cli-app-templates | aws | C# | using Amazon.Lambda.Core;
using System;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.CamelCaseLambdaJsonSerializer))]
namespace StockBuyer
{
public class StockEvent
{
pu... | 59 |
aws-sam-cli-app-templates | aws | C# | using System;
using Amazon.Lambda.Core;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.CamelCaseLambdaJsonSerializer))]
namespace StockChecker
{
public class StockEvent
{
... | 43 |
aws-sam-cli-app-templates | aws | C# | using Amazon.Lambda.Core;
using System;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.CamelCaseLambdaJsonSerializer))]
namespace StockSeller
{
public class StockEvent
{
p... | 59 |
aws-sam-cli-app-templates | aws | C# | using Amazon.Lambda.TestUtilities;
using Xunit;
namespace StockBuyer.Tests
{
public class FunctionTest
{
[Fact]
public void TestStockBuyerFunctionHandler()
{
var testStockPrice = 34;
var request = new StockEvent { StockPrice = testStockPrice };
var context = new Tes... | 36 |
aws-sam-cli-app-templates | aws | C# | using Amazon.Lambda.TestUtilities;
using Xunit;
namespace StockChecker.Tests
{
public class FunctionTest
{
[Fact]
public void TestStockCheckerFunctionHandler()
{
var context = new TestLambdaContext();
var function = new Function();
var response = function.FunctionH... | 21 |
aws-sam-cli-app-templates | aws | C# | using System;
using Amazon.Lambda.TestUtilities;
using Xunit;
namespace StockSeller.Tests
{
public class FunctionTest
{
[Fact]
public void TestStockSellerFunctionHandler()
{
var testStockPrice = 86;
var request = new StockEvent { StockPrice = testStockPrice };
var c... | 37 |
aws-sam-cli-app-templates | aws | C# | using System.Text.Json;
using Amazon;
using Amazon.DynamoDBv2;
using Amazon.DynamoDBv2.DataModel;
using {{cookiecutter.project_name}}.Repositories;
var builder = WebApplication.CreateBuilder(args);
//Logger
builder.Logging
.ClearProviders()
.AddJsonConsole();
// Add services to the container.
build... | 43 |
aws-sam-cli-app-templates | aws | C# | using Amazon.DynamoDBv2.DataModel;
using Microsoft.AspNetCore.Mvc;
using {{cookiecutter.project_name}}.Entities;
using {{cookiecutter.project_name}}.Repositories;
namespace {{cookiecutter.project_name}}.Controllers;
[Route("api/[controller]")]
[Produces("application/json")]
public class BooksController : ControllerBa... | 105 |
aws-sam-cli-app-templates | aws | C# | using Amazon.DynamoDBv2.DataModel;
namespace {{cookiecutter.project_name}}.Entities;
// <summary>
/// Map the Book Class to DynamoDb Table
/// To learn more visit https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DeclarativeTagsList.html
/// </summary>
[DynamoDBTable("{{cookiecutter.project_name}}BookC... | 31 |
aws-sam-cli-app-templates | aws | C# | using Amazon.DynamoDBv2.DataModel;
using Amazon.DynamoDBv2.DocumentModel;
using {{cookiecutter.project_name}}.Entities;
namespace {{cookiecutter.project_name}}.Repositories
{
public class BookRepository : IBookRepository
{
private readonly IDynamoDBContext context;
private readonly ILogger... | 130 |
aws-sam-cli-app-templates | aws | C# | using {{cookiecutter.project_name}}.Entities;
namespace {{cookiecutter.project_name}}.Repositories
{
/// <summary>
/// Sample DynamoDB Table book CRUD
/// </summary>
public interface IBookRepository
{
/// <summary>
/// Include new book to the DynamoDB Table
/// </summary>... | 45 |
aws-sam-cli-app-templates | aws | C# | using {{cookiecutter.project_name}}.Entities;
using {{cookiecutter.project_name}}.Repositories;
using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic;
using System.Net.Http.Json;
using System.Threading.Tasks;
using Xunit;
namespace {{cookiecutter.pr... | 54 |
aws-sam-cli-app-templates | aws | C# | using Bogus;
using {{cookiecutter.project_name}}.Entities;
using {{cookiecutter.project_name}}.Repositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace {{cookiecutter.project_name}}.Tests
{
internal class MockBookRepository : IBookRepository
{
... | 54 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
namespace CustomRoslynAnalyzers
{
public static class DiagnosticIds
{
// Category: AwsSdkRules
public const string PreventMD5UseRuleId = "CR1000";
public const string PreventHashAlgorithmCreateRuleId = "CR1001";
... | 17 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
namespace CustomRoslynAnalyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
... | 81 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
namespace CustomRoslynAnalyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
... | 81 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
namespace CustomRoslynAnalyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
... | 208 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
namespace CustomRoslynAnalyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
... | 62 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
namespace CustomRoslynAnalyzers
{
[DiagnosticAnalyzer(Langu... | 105 |
aws-sdk-net | aws | C# | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//... | 64 |
aws-sdk-net | aws | C# | using System;
using System.Composition;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnaly... | 79 |
aws-sdk-net | aws | C# | using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CustomRoslynAnalyzers.CodeFix
{
class CodeFixHelper
{
publ... | 62 |
aws-sdk-net | aws | C# | using System;
using System.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
namespace CustomRoslynAnalyzers.CodeFix
{
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(PreventDateTimeNowUseAnalyzerCodeFix)), Shared]
public class PreventDateTimeNowUseAnalyzerCodeFix : ... | 19 |
aws-sdk-net | aws | C# | using System;
using System.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
namespace CustomRoslynAnalyzers.CodeFix
{
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(PreventHashAlgorithmCreateAnalyzerCodeFix)), Shared]
public class PreventHashAlgorithmCreateAnalyzer... | 18 |
aws-sdk-net | aws | C# | using System;
using System.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
namespace CustomRoslynAnalyzers.CodeFix
{
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(PreventMD5UseAnalyzerCodeFix)), Shared]
public class PreventMD5UseAnalyzerCodeFix : BaseClassofCodeF... | 18 |
aws-sdk-net | aws | C# | using System;
using System.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
namespace CustomRoslynAnalyzers.CodeFix
{
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(PreventRegionEndpointUseAnalyzerCodeFixProvider)), Shared]
public class PreventRegionEndpointUseAnal... | 17 |
aws-sdk-net | aws | C# | using System;
using System.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
namespace CustomRoslynAnalyzers.CodeFix
{
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(PreventStaticLoggerAnalyzerCodeFix)), Shared]
public class PreventStaticLoggerAnalyzerCodeFix : Base... | 18 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using CustomRoslynAnalyzers.Test.TestHelper;
using Xunit;
using CustomRoslynAnalyzers.CodeFix;
using Microsoft.CodeAnalysis.CodeFixes;
namespace CustomRoslynAnalyzers.Test
{
... | 112 |
aws-sdk-net | aws | C# | using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using System;
using System.Collections.Generic;
using System.Text;
using CustomRoslynAnalyzers.Test.TestHelper;
using Xunit;
using Microsoft.CodeAnalysis.CodeFixes;
using CustomRoslynAnalyzers.CodeFix;
namespace CustomRoslynAnalyzers.Test
{
... | 113 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
using Xunit;
using CustomRoslynAnalyzers.Test.TestHelper;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis;
using CustomRoslynAnalyzers.CodeFix;
using Microsoft.CodeAnalysis.CodeFixes;
namespace CustomRoslynAnalyzers.Test
{
... | 71 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
using Xunit;
using CustomRoslynAnalyzers.Test.TestHelper;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
using CustomRoslynAnalyzers.CodeFix;
namespace CustomRoslynAnalyzers.Test
{
... | 71 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.Diagnostics;
using CustomRoslynAnalyzers.Test.TestHelper;
using Xunit;
using CustomRoslynAnalyzers.CodeFix;
namespace CustomRoslynAnalyzers.Test
{
... | 70 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
namespace CustomRoslynAnalyzers.Test
{
public partial class PreventDateTimeNowUseAnalyzerTests
{
private const string BasicCorrectData = @"
using System;
using System.Diagnostics.CodeAnalysis;
namespace TestPreventTimeNowUseAnalyzer... | 248 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
namespace CustomRoslynAnalyzers.Test
{
public partial class PreventHashAlgorithmCreateAnalyzerTests
{
private const string BasicCorrectData = @"
using System;
using System.Security.Cryptography;
namespace TestPreventTimeNowUseAnalyz... | 258 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
namespace CustomRoslynAnalyzers.Test
{
public partial class PreventMD5AnalyzerTests
{
private const string BasicFieldData = @"
using System.Security.Cryptography;
using System.Diagnostics.CodeAnalysis;
namespace TestPreventMD5UseAna... | 255 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
namespace CustomRoslynAnalyzers.Test
{
public partial class PreventRegionEndpointUseAnalyzerTests
{
private const string BasicFieldData = @"
using System;
using System.Diagnostics.CodeAnalysis;
using Amazon;
namespace TestPreventReg... | 262 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Text;
namespace CustomRoslynAnalyzers.Test
{
public partial class PreventStaticLoggersAnalyzerTests
{
private const string BasicDataForImplementILogger = @"
public class Logger : ILogger
{
public void Debug(Exception except... | 120 |
aws-sdk-net | aws | C# | using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.Formatting;
using Microsoft.CodeAnalysis.Simplification;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
/// <summary>
/// The Code under this class is generated by Visual Studio
/// </summ... | 89 |
aws-sdk-net | aws | C# | using Microsoft.CodeAnalysis;
using System;
/// <summary>
/// The Code under this class is generated by Visual Studio
/// </summary>
namespace CustomRoslynAnalyzers.Test.TestHelper
{
/// <summary>
/// Location where the diagnostic appears, as determined by path, line number, and column number.
/// </summar... | 91 |
aws-sdk-net | aws | C# | using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Text;
using System;
using System.Runtime;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Security.Cryptography;
using System.Re... | 191 |
aws-sdk-net | aws | C# | using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Formatting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using System.Linq;
using System.Threadi... | 132 |
aws-sdk-net | aws | C# | using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// The Code under this class is generated by Visual Studio
/// </summar... | 274 |
aws-sdk-net | aws | C# | using System;
using Microsoft.Build.Utilities;
using System.Diagnostics;
using System.Threading;
namespace CustomTasks
{
public abstract class BuildTaskBase : Task
{
public bool WaitForDebugger { get; set; }
public int MaxAttempts { get; set; }
public BuildTaskBase()
{
... | 64 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Build.Framework;
using System.IO;
using Newtonsoft.Json;
namespace CustomTasks
{
public class PlaceModelTask : BuildTaskBase
{
public const string METADATA_JSON = "m... | 144 |
aws-sdk-net | aws | C# | using System;
using System.Threading;
namespace CustomTasks
{
public class TimingTask : BuildTaskBase
{
private readonly static TimeSpan SleepTime = TimeSpan.FromSeconds(30);
private static bool ShouldInit = true;
private static Thread MainThread = null;
private static DateTi... | 43 |
aws-sdk-net | aws | C# | using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.IO;
using System.Linq;
namespace CustomTasks.Endpoint
{
/// <summary>
/// Implementation of a IEndpointOverrider
/// Endpoint overrider: will override the endpoints.json file and remove/add endpoints
/// Based on a json in... | 90 |
aws-sdk-net | aws | C# | using System;
using System.IO;
namespace CustomTasks.Endpoint
{
public class EndpointOverriderTask : BuildTaskBase
{
public string EndpointsJsonSourceLocation { get; set; }
public string EndpointsOverrideLocation { get; set; }
public override bool Execute()
{
if ... | 26 |
aws-sdk-net | aws | C# | namespace CustomTasks.Endpoint
{
/// <summary>
/// Implementation of a file system layer using System.IO
/// </summary>
public class FileSystem : IFileSystem
{
public string ReadAllText(string path)
{
return System.IO.File.ReadAllText(path);
}
public v... | 24 |
aws-sdk-net | aws | C# | namespace CustomTasks.Endpoint
{
/// <summary>
/// Endpoint overrider: will override the endpoints.json file and remove/add endpoints
/// Based on a json input file for addition and removal
/// </summary>
interface IEndpointOverrider
{
/// <summary>
/// Applies overrides to an... | 18 |
aws-sdk-net | aws | C# | namespace CustomTasks.Endpoint
{
/// <summary>
/// Abstraction layer to a file system.
/// </summary>
public interface IFileSystem
{
string ReadAllText(string path);
void WriteAllText(string path, string contents);
void Copy(string sourceFileName, string destFileName, bo... | 15 |
aws-sdk-net | 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 |
aws-sdk-net | aws | C# | using Moq;
using NUnit.Framework;
using System;
namespace CustomTasks.Endpoint.Test
{
public class EndpointOverriderTests
{
private const string BaseContentPath = "../../../Content";
private readonly string ENDPOINT_SOURCE = $"{BaseContentPath}/endpoints-source.json";
[Test]
... | 82 |
aws-sdk-net | aws | C# | using System;
using NUnit.Framework;
namespace TestCases
{
public class RandomFailureTests
{
private static readonly Random random = new Random();
private static readonly int FREQUENCY = 25;
private const string SAMPLE_S3_MULTILINE_STRING =
"B;chunk-signature=6a4d50a3307... | 178 |
aws-sdk-net | 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 |
aws-sdk-net | aws | C# | using System;
using NUnit.Framework;
namespace TestCases
{
public class MismatchTest
{
[Test]
public void SignatureMismatch()
{
throw new Exception("The request signature we calculated does not match the signature you provided.");
}
}
}
| 16 |
aws-sdk-net | 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 |
aws-sdk-net | aws | C# | using System;
using Xunit;
namespace DummyXUnitTestCases
{
public class TestCases
{
private int Add(int a, int b)
{
return a + b;
}
[Fact]
public void PassingTest()
{
Assert.True(4 == Add(2, 2));
}
[Fact]
publi... | 58 |
aws-sdk-net | 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 |
aws-sdk-net | 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 |
aws-sdk-net | 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 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;
using TestWrapper.TestRunners;
using System.IO;
namespace TestWrapper
{
public class MSTestRunner : TestRunner
{
public MSTestRunner(string testSuiteE... | 20 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.IO;
namespace TestWrapper
{
public class ResultsSummary
{
public readonly static IList<string> NO_RETRYABLE_STRINGS = new List<string>
{
"The request signature we calculated does not match the signature you provided."
... | 59 |
aws-sdk-net | aws | C# | using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using System.Xml;
using System.Xml.Linq;
using Amazon.Runtime.CredentialManagement;
namespace TestWrapper.TestRunners... | 428 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;
using TestWrapper.TestRunners;
using System.IO;
namespace TestWrapper
{
public class XUnitTestRunner : TestRunner
{
public XUnitTestRunner(string test... | 20 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Build.Utilities;
using System.IO;
using System.Reflection;
using Microsoft.Build.Framework;
using TestWrapper.TestRunners;
namespace TestWrapper
{
public class MsTestWrapperTask : TestWrapperTask
{
... | 33 |
aws-sdk-net | aws | C# | using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using TestWrapper.TestRunners;
namespace TestWrapper
{
public abstract class TestWrapperTask ... | 124 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Build.Utilities;
using System.IO;
using System.Reflection;
using Microsoft.Build.Framework;
using static TestWrapper.XUnitTestRunner;
using TestWrapper.TestRunners;
namespace TestWrapper
{
public class XUnitWra... | 32 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
namespace AWSSDKDocSamples
{
class Program
{
static int Main(string[] args)
{
bool allPass = true;
var iSampleTypes = Assembly
.GetExecuting... | 50 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.AppConfig;
using Amazon.AppConfig.Model;
namespace AWSSDKDocSamples.Amazon.AppConfig.Generated
{
class AppConfigSamples : ISample
{
public void AppConfigCreateApplication()
... | 648 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.ApplicationAutoScaling;
using Amazon.ApplicationAutoScaling.Model;
namespace AWSSDKDocSamples.Amazon.ApplicationAutoScaling.Generated
{
class ApplicationAutoScalingSamples : ISample
... | 249 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.AutoScaling;
using Amazon.AutoScaling.Model;
namespace AWSSDKDocSamples.Amazon.AutoScaling.Generated
{
class AutoScalingSamples : ISample
{
public void AutoScalingAttachInst... | 1,130 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.Batch;
using Amazon.Batch.Model;
namespace AWSSDKDocSamples.Amazon.Batch.Generated
{
class BatchSamples : ISample
{
public void BatchCancelJob()
{
#regio... | 507 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.Cloud9;
using Amazon.Cloud9.Model;
namespace AWSSDKDocSamples.Amazon.Cloud9.Generated
{
class Cloud9Samples : ISample
{
public void Cloud9CreateEnvironmentEC2()
{
... | 218 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.CloudFormation;
using Amazon.CloudFormation.Model;
namespace AWSSDKDocSamples.Amazon.CloudFormation.Generated
{
class CloudFormationSamples : ISample
{
static IAmazonCloudFo... | 154 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.CloudWatch;
using Amazon.CloudWatch.Model;
namespace AWSSDKDocSamples.CloudWatch
{
class CloudWatchSamples : ISample
{
public static void CWGetMetricStatistics()
{
#reg... | 374 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.CodeBuild;
using Amazon.CodeBuild.Model;
namespace AWSSDKDocSamples.Amazon.CodeBuild.Generated
{
class CodeBuildSamples : ISample
{
public void CodeBuildBatchGetBuilds()
... | 41 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.CodePipeline;
using Amazon.CodePipeline.Model;
namespace AWSSDKDocSamples.Amazon.CodePipeline.Generated
{
class CodePipelineSamples : ISample
{
static IAmazonCodePipeline cl... | 400 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.CostAndUsageReport;
using Amazon.CostAndUsageReport.Model;
namespace AWSSDKDocSamples.Amazon.CostAndUsageReport.Generated
{
class CostAndUsageReportSamples : ISample
{
publi... | 81 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.DatabaseMigrationService;
using Amazon.DatabaseMigrationService.Model;
namespace AWSSDKDocSamples.Amazon.DatabaseMigrationService.Generated
{
class DatabaseMigrationServiceSamples : ISa... | 702 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.DeviceFarm;
using Amazon.DeviceFarm.Model;
namespace AWSSDKDocSamples.Amazon.DeviceFarm.Generated
{
class DeviceFarmSamples : ISample
{
public void DeviceFarmCreateDevicePoo... | 687 |
aws-sdk-net | aws | C# | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Amazon.DynamoDBv2;
using Amazon.DynamoDBv2.Model;
namespace AWSSDKDocSamples.Amazon.DynamoDBv2.Generated
{
class DynamoDBSamples : ISample
{
public void DynamoDBBatchGetItem()
... | 75 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.