Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Improvements #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

danieljharris
Copy link

Made several improvements to the logic and structure of the C#. I expect that some of them would not be wanted in the main repo due to style or complexity reasons. Feel free to use any of the improvements/not use any you want. Just thought it might be useful to others so thought I'd put the PR in.

If you want to keep a large amount of changes but want small things altered let me know and I'm happy to make the changes.

Exact same input, processes, and output, only some improvments to code structure:
Origional version: 302 lines
New Version: 179

@gamullen
Copy link
Owner

gamullen commented Apr 26, 2024

@danieljharris :

Thanks for your updates!

To get it to build I had to:

  1. Fix this line: "public required string {roposedCIDR { get; set; }"
  2. Upgrade from .NET 6.0
  3. Add "using System.Linq;"

Can you please fix? Thanks!

Gary

- Upgraded to .NET 8.0
- Added Linq using
- Removed duplicated section of code
@danieljharris
Copy link
Author

  • Fixed typo
  • Upgraded to .NET 8.0
  • Added Linq using
  • Removed duplicated section of code

@gamullen
Copy link
Owner

gamullen commented May 7, 2024

I'm still getting the errors below. Plus, several of the NuGet packages need to be upgraded due to vulnerabilities.

Severity Code Description Project File Line Suppression State
Error CS8936 Feature 'required members' is not available in C# 10.0. Please use language version 11.0 or greater. FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 46 Active
Error CS0656 Missing compiler required member 'System.Runtime.CompilerServices.RequiredMemberAttribute..ctor' FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 44 Active
Error CS0656 Missing compiler required member 'System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute..ctor' FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 44 Active
Error CS8936 Feature 'required members' is not available in C# 10.0. Please use language version 11.0 or greater. FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 45 Active
Error CS8936 Feature 'required members' is not available in C# 10.0. Please use language version 11.0 or greater. FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 47 Active
Error CS8936 Feature 'required members' is not available in C# 10.0. Please use language version 11.0 or greater. FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 48 Active
Error CS8936 Feature 'required members' is not available in C# 10.0. Please use language version 11.0 or greater. FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 49 Active
Error CS8936 Feature 'required members' is not available in C# 10.0. Please use language version 11.0 or greater. FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 50 Active
Error CS0656 Missing compiler required member 'System.Runtime.CompilerServices.RequiredMemberAttribute..ctor' FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 52 Active
Error CS0656 Missing compiler required member 'System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute..ctor' FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 52 Active
Error CS8936 Feature 'required members' is not available in C# 10.0. Please use language version 11.0 or greater. FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 53 Active
Error CS8936 Feature 'required members' is not available in C# 10.0. Please use language version 11.0 or greater. FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\GetCidr.cs 54 Active
Warning NU1902 Package 'Azure.Identity' 1.10.4 has a known moderate severity vulnerability, GHSA-wvxc-855f-jvrv FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\FindNextCIDRRange.csproj 1
Warning NU1901 Package 'Microsoft.Identity.Client' 4.60.1 has a known low severity vulnerability, GHSA-x674-v45j-fwxw FindNextCIDRRange C:\Users\gamullen\Source\Repos\FindNextCIDRRange-Daniel\src\Find-NextCidrRange\FindNextCIDRRange.csproj 1

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.

2 participants