Skip to content

Update the .NET Core project template#1226

Merged
awood45 merged 17 commits intoaws:developfrom
normj:update-dotnet-template
Aug 5, 2019
Merged

Update the .NET Core project template#1226
awood45 merged 17 commits intoaws:developfrom
normj:update-dotnet-template

Conversation

@normj
Copy link
Member

@normj normj commented Jun 12, 2019

Description of changes:
Cleaning up the project template created from sam init to be more .NET idiomatic

Checklist:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kiiadi
Copy link
Contributor

kiiadi commented Jun 19, 2019

@normj there's a bunch of unused imports in the Function.cs can we clean then up as part of this? The required imports for Function.cs should be (I believe):

using System.Collections.Generic;
using System.Threading.Tasks;
using System.Net.Http;
using Newtonsoft.Json;

using Amazon.Lambda.Core;
using Amazon.Lambda.APIGatewayEvents;

The FunctionTest.cs test file also seems to have some that aren't required. The required imports should be :

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Net.Http;
using Newtonsoft.Json;
using Xunit;
using Amazon.Lambda.TestUtilities;
using Amazon.Lambda.APIGatewayEvents;

There's also some other hints about best practice violations, for example var ExpectedResponse in FunctionTest.cs should start with a lower-case per convention right?

@normj
Copy link
Member Author

normj commented Jun 19, 2019

Good catch, I didn't look at the FunctionTest for style issues. I pushed a new commit cleaning up the provided test case and unused namespaces. I did leave System.Linq because it provides a lot of extension methods to collections that surprise people when they don't show because System.Linq is not included.

I tested this by building and deploying my local version of the project and running the test case for the project.

@sriram-mv
Copy link
Contributor

@normj can I take over this PR? Looks like we need to rebase this.

@normj
Copy link
Member Author

normj commented Aug 5, 2019

@thesriram Yes feel free to take over the PR. You can ping me if you want to review any of the C# code.

@awood45 awood45 merged commit 55d55ca into aws:develop Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants