Category: open source

  • NetCoreUsefullEndpoints-part 14–adding roles and claims and authorization

    I have added the current user role and claims to the nuget Usefull Endpoints for .NET Core  .  The endpoints are api/usefull/user/isInRole/{roleName} and api/usefull/user/claims/simple and api/usefull/user/authorization For the first one the code is pretty simple [code lang=”csharp”] route.MapGet("api/usefull/user/isInRole/{roleName}",(HttpContext httpContext,string roleName) => { return httpContext.User?.IsInRole(roleName)??false; }).WithTags("NetCoreUsefullEndpoints") .WithOpenApi(); [/code] For claims and authorization,please see code at ignatandrei/NetCoreUsefullEndpoints:…

  • Demeter and Roslyn–part 3–config and tests

    Beyond the Squiggles: Flexible Reporting and Confidence Through Testing So,we’ve built our Law of Demeter analyzer,RSCG_Demeter,using Roslyn to intelligently spot those overly-chatty code chains,even navigating the complexities of fluent interfaces. We could just have it throw warnings or errors directly in your IDE via Roslyn diagnostics. But let’s be honest,sometimes a flood of new diagnostics…

  • Demeter and Roslyn–part 2- code

    Okay,let’s build on the first part and explain the “how” in a more engaging way,weaving in the code snippets to illustrate the process. From Counting Dots to Understanding Code: Building the Demeter Analyzer In the first part,we established our mission: build a Roslyn analyzer to sniff out Law of Demeter violations – stopping our code…

  • Demeter and Roslyn–part 1–idea

    Stop Your C# Code Talking to Strangers: Introducing a Law of Demeter Roslyn Analyzer The Law of Demeter (LoD),often summarized as “Only talk to your immediate friends,” is a valuable principle for writing loosely coupled,maintainable code. Code that follows LoD tends to be less fragile and easier to refactor. But manually checking for LoD violations?…

  • Quality Links /Icons for your open source project

    A good  open source must show how good the source are  -without the reader to do investigation first. I decided to do an exhaustive inventory for my pet project Stankins. So you have here,in no particular order: Link to the Continous Integration – Azure Pipelines –  to let the user know that we build regularly…

  • OpenSource library- conclusion

    Part 1 Implement Open-source library guidance Part 2 OpenSource library – Cross-platform targeting Part 3 OpenSource library-Dependencies Part 4 OpenSource library- Source Link Part 5 OpenSource library-versioning Part 6 OpenSource library- Breaking changes Part 7 OpenSource library- conclusion Following the guidance from https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/ it is somehow simple. Most of the rules are already implemented,other are…

  • OpenSource library- Breaking changes

    Part 1 Implement Open-source library guidance Part 2 OpenSource library – Cross-platform targeting Part 3 OpenSource library-Dependencies Part 4 OpenSource library- Source Link Part 5 OpenSource library-versioning Part 6 OpenSource library- Breaking changes Part 7 OpenSource library- conclusion Following guidance from https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/breaking-changes Nr Recomandation AOP Roslyn 1 DO think about how your library will be…

  • OpenSource library-versioning

    Part 1 Implement Open-source library guidance Part 2 OpenSource library – Cross-platform targeting Part 3 OpenSource library-Dependencies Part 4 OpenSource library- Source Link Part 5 OpenSource library-versioning Part 6 OpenSource library- Breaking changes Part 7 OpenSource library- conclusion Following recommendations from https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/versioning Nr Recomandation AOP Roslyn 1 CONSIDER using SemVer 2.0.0 to version your NuGet…

  • OpenSource library- Source Link

    Part 1 Implement Open-source library guidance Part 2 OpenSource library – Cross-platform targeting Part 3 OpenSource library-Dependencies Part 4 OpenSource library- Source Link Part 5 OpenSource library-versioning Part 6 OpenSource library- Breaking changes Part 7 OpenSource library- conclusion The documentation at https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink says to enable source link. Nr Recomandation AOP Roslyn 1 CONSIDER using SourceLink…

  • OpenSource library–Dependencies

    Part 1 Implement Open-source library guidance Part 2 OpenSource library – Cross-platform targeting Part 3 OpenSource library-Dependencies Part 4 OpenSource library- Source Link Part 5 OpenSource library-versioning Part 6 OpenSource library- Breaking changes Part 7 OpenSource library- conclusion Now trying to respect what it says at https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/dependencies . Nr Recomandation AOP Roslyn 1 DO review…