This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Project Sdk="Microsoft.NET.Sdk.Web"> | |
| <PropertyGroup> | |
| <TargetFramework>net6.0</TargetFramework> | |
| <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | |
| <AWSProjectType>Lambda</AWSProjectType> | |
| <!-- This property makes the build directory similar to a publish directory and helps the AWS .NET Lambda Mock Test Tool find project dependencies. --> | |
| <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | |
| <PublishReadyToRun>true</PublishReadyToRun> | |
| <TrimMode>true</TrimMode> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import axios from 'axios'; | |
| import { LogFactory, Logger, LogService, MangaLaterFunction, IdentityIAM, IdentitySTS, UserIAM, UserSTS, LogMessageTypes } from '@manga-later/sdk-javascript'; | |
| import { Context, CloudFormationCustomResourceEvent, CloudFormationCustomResourceResponse } from 'aws-lambda'; | |
| import AWSXRay from 'aws-xray-sdk'; | |
| import aws from 'aws-sdk'; | |
| const AWS = AWSXRay.captureAWS(aws); | |
| export const SecureStringHandler = async (event: CloudFormationCustomResourceEvent, context: Context): Promise<void> => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'mocha'; | |
| import { expect } from 'chai'; | |
| import { PostApp } from '../../src/apps/post-app'; | |
| import { TodoItem } from '../../src/models/todo-item'; | |
| import { TodoRepository } from '../../src/models/todo-repository'; | |
| import { ApiGatewayResponse } from '../../src/models/apigateway/apigateway-response'; | |
| import { ApiGatewayEventMock } from '../models/apigateway-event-mock'; | |
| describe('PostApp instance', () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'mocha'; | |
| import { expect } from 'chai'; | |
| import * as sinon from 'sinon'; | |
| import { DynamoDB } from 'aws-sdk'; | |
| import { handler } from '../../src/handlers/post-item'; | |
| import { ApiGatewayResponse } from '../../src/models/apigateway/apigateway-response'; | |
| import { ApiGatewayEventMock } from '../models/apigateway-event-mock'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const CloudFormation = require('yaml-cfn') | |
| // Extract the AWS::Serverless::Function Resources as they | |
| // are the entires we need to compile. | |
| const { Resources } = CloudFormation.yamlParse(fs.readFileSync('template.yml')) | |
| const entries = Object.values(Resources) | |
| .filter(resource => resource.Type == 'AWS::Serverless::Function') | |
| .filter(resource => resource.Properties.Runtime.startsWith('dotnetcore')) | |
| .map(resource => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ProjectEntity | |
| { | |
| public Guid Id { get; set; } = Guid.NewGuid(); | |
| public Guid TrackerId { get; set; } | |
| public string Title { get; set; } | |
| public bool IsFlagged { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.AspNetCore; | |
| using Microsoft.AspNetCore.Hosting; | |
| using Microsoft.AspNetCore.Mvc.Testing; | |
| using Microsoft.AspNetCore.TestHost; | |
| using Microsoft.EntityFrameworkCore; | |
| using Microsoft.Extensions.Configuration; | |
| using MySql.Data.MySqlClient; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Connection | |
| { | |
| Socket connection; | |
| IPublisher publisher; | |
| public Connection(IPublisher publisher, Socket connection) | |
| { | |
| this.publisher = publisher; | |
| this.connection = connection; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| namespace MudDesigner.Engine.Core | |
| { | |
| /// <summary> | |
| /// <para> | |
| /// The Engine Timer allows for starting a timer that will execute a callback at a given interval. | |
| /// </para> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.VisualStudio.TestTools.UnitTesting; | |
| using System.Threading.Tasks; | |
| namespace FuncContravarianceIssue | |
| { | |
| [TestClass] | |
| public class UnitTest1 | |
| { | |
| private class Foo | |
| { |
NewerOlder