• AutoActions for Skinny controllers–custom template

    Now I want to let the user make his own template. For this,I have enriched the attribute AutoActionsAttribute with a public string CustomTemplateFileName { get; set; }   The code was pretty easy,just reading from GeneratorExecutionContext . AdditionalFiles instead of reading from the template in the dll     There are 2 small catches 1…

  • AutoActions for Skinny controllers–code improvements and more docs

    I realized that this code Assembly.GetExecutingAssembly(); was executing for each controller. So I decided to move to a class variable and attribute once. Also,I may want to have all fields – so I decided to express via a special field * The code modifications were,thanks to Linq,pretty small: bool All = fields.Contains(“*”); var memberFields =…

  • AutoActions for Skinny controllers-documentation improvements

    One improvement is to move  Initialize in other partial class. . It was difficult every time I need to activate the debugger public void Initialize(GeneratorInitializationContext context)         {             context.RegisterForSyntaxNotifications(() => new SyntaxReceiverFields());             //in development             //Debugger.Launch();         } Second was to improve the Nuget package description. I have added <Version>2020.11.28.2108</Version>    <Authors>Andrei Ignat</Authors>    <PackageTags>RoslynCodeGenerators C# CSharp SkinnyControllers</PackageTags>    <PackageProjectUrl>https://github.com/ignatandrei/AOP_With_Roslyn</PackageProjectUrl>   …

  • Friday Links 403

    Optimize your productivity with .NET in Visual Studio 2017 | The Visual Studio Blog akveo/ng2-admin: Angular 2 admin dashboard framework Working with Windows Containers and Docker: Up and Running – Simple Talk Async Tip: why you should avoid void | How to get a System.Net trace of your C# Web Job – Microsoft Azure App…

  • AutoActions for Skinny controllers–second template

    The second template was pretty easy. All the date was inside the class definition : class ClassDefinition     {         public string ClassName;         public string NamespaceName;         public Dictionary<string,MethodDefinition[]> DictNameField_Methods;         public string version = ThisAssembly.Info.Version;         }     class MethodDefinition     {         public string Name { get; set; }         public string FieldName { get; set; }         public string ReturnType;         public…

  • AutoActions for Skinny controllers- templating-part2

    Now I want to add templates to my controller  generators . But this feature changed the whole perspective about the project. Why ? Because a template do not apply just to a field – but to the whole controller. So instead of having attributes on the field [AutoActions] private readonly RepositoryWF repository; I will have…

  • AutoActions for Skinny controllers–user customization

    The generation of controllers actions is now very rude: Http Method: if the method has no arguments,I assume GET . Else it is POST How I can handle pure full REST API generation ? How I can handle level 3 REST API – https://martinfowler.com/articles/richardsonMaturityModel.html  ? How I can handle any other models,like https://blog.ploeh.dk/2020/10/26/fit-urls/ What is…

  • AutoActions for Skinny controllers-Templating-part1

    In order to do templating,I have transform all text generation into classes Example: code.AppendLine($”{fieldName}.{ms.Name}({parametersCall});”); into class MethodDefinition { public string ClassName { get; set; } public string Name { get; set; } public Type ReturnType; public bool ReturnsVoid; //name,type public Dictionary<string,string> Parameters; } ( of course,this definition has changed multiple times…) Then I have added…

  • Friday Links 402

    OAuth2 Social Logins – Facebook,Google,Twitter,PayPal – ASP.NET MVC C# open source library – CodeProject lepipele/OAuth2Login: Open source library providing social OAuth2 logins – Facebook,Google,Twitter,PayPal Gigaom | Unleashing A.I.-Powered Conversation With IBM Watson Revealing Secrets with R and Factor Analysis — Visual Studio Magazine mrochon/ASPNETRoleDiscovery: Console app reflecting over an ASP.NET assembly (and references) to discover…

  • AutoActions for Skinny controllers–small customizations

    Logging Roslyn Code Generator: For each program that you develop,it is important ( if not vital ) to see logging. In the Roslyn  Analyzer / Code Generators,the diagnostics are logged with DiagnosticDescriptor and Diagnostic – think that you should see in the output console when compiling and this will become clear. More,the enum DiagnosticSeverity Enum…

I am ok , you are ok