Skip to main content

RSCG_Wait by Andrei Ignat

NuGet / site data

Nuget GitHub last commit GitHub Repo stars

Details

Info

info

Name: RSCG_Wait

This package wait for a time and put all global options into a cs file

Author: Andrei Ignat

NuGet: https://www.nuget.org/packages/RSCG_WaitAndOptions/

You can find more details at https://github.com/ignatandrei/RSCG_WaitAndOptions

Source: https://github.com/ignatandrei/RSCG_WaitAndOptions

Original Readme

note

RSCG_WaitAndOptions

Wait pending compilation and see compiling options

This package is just for demo purposes and it is not intended to be used in production code.

More details at https://ignatandrei.github.io/RSCG_Examples/v2/docs/GoodPractices

How to use

Add the Nuget package RSCG_WaitAndOptions to your project and use the following code:

<ItemGroup>
<CompilerVisibleProperty Include="RSCG_Wait_Seconds" />
</ItemGroup>
<PropertyGroup>
<RSCG_Wait_Seconds>10</RSCG_Wait_Seconds>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RSCG_WaitAndOptions" Version="2024.2.24.1940"
OutputItemType="Analyzer" ReferenceOutputAssembly="false"
/>
</ItemGroup>

And then compile the code . You will see in obj/GX the code generated

And you can access by

Console.WriteLine(RSCG_Wait.MyGeneratedCode.DateStart);
Console.WriteLine(RSCG_Wait.MyGeneratedCode.SecondsToWait);
Console.WriteLine(RSCG_Wait.MyGeneratedCode.DateEnd);
Console.WriteLine(RSCG_Wait.OptionsFromBuild.build_property_projectdir);

About

note

Demo for waiting in compilation and show the options of compiling the code

How to use

Example (source csproj, source files)

This is the CSharp Project that references RSCG_Wait

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

</PropertyGroup>
<ItemGroup>
<CompilerVisibleProperty Include="RSCG_Wait_Seconds" />
</ItemGroup>
<PropertyGroup>
<RSCG_Wait_Seconds>10</RSCG_Wait_Seconds>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RSCG_WaitAndOptions" Version="2024.2.24.1940"
OutputItemType="Analyzer" ReferenceOutputAssembly="false"
/>
</ItemGroup>
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

</Project>

Generated Files

Those are taken from $(BaseIntermediateOutputPath)\GX

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool RSCG_Wait.
// Runtime Version: 2024.2.24.1940
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//pragma warning disable CS1591
namespace RSCG_Wait;
[global::System.CodeDom.Compiler.GeneratedCode("RSCG_Wait", "2024.2.24.1940")]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
partial class OptionsFromBuild
{//real name: build_property.rootnamespace
public static string build_property_rootnamespace => @"Console_Wait";
//real name: build_property.projecttypeguids
public static string build_property_projecttypeguids => @"";
//real name: build_property.enforceextendedanalyzerrules
public static string build_property_enforceextendedanalyzerrules => @"";
//real name: build_property.rscg_wait_seconds
public static string build_property_rscg_wait_seconds => @"10";
//real name: build_property.targetframework
public static string build_property_targetframework => @"net8.0";
//real name: build_property.targetplatformminversion
public static string build_property_targetplatformminversion => @"";
//real name: build_property.enablecodestyleseverity
public static string build_property_enablecodestyleseverity => @"";
//real name: build_property.invariantglobalization
public static string build_property_invariantglobalization => @"";
//real name: build_property.platformneutralassembly
public static string build_property_platformneutralassembly => @"";
//real name: build_property.effectiveanalysislevelstyle
public static string build_property_effectiveanalysislevelstyle => @"8.0";
//real name: build_property.projectdir
public static string build_property_projectdir => @"D:\eu\GitHub\RSCG_Examples\v2\rscg_examples\RSCG_Wait\src\Console_Wait\";
//real name: build_property.enablecomhosting
public static string build_property_enablecomhosting => @"";
//real name: build_property.enablegeneratedcominterfacecomimportinterop
public static string build_property_enablegeneratedcominterfacecomimportinterop => @"";
//real name: build_property._supportedplatformlist
public static string build_property__supportedplatformlist => @"Linux,macOS,Windows";
//real name: build_property.usingmicrosoftnetsdkweb
public static string build_property_usingmicrosoftnetsdkweb => @"";
}//end class//end namespace

Useful

Download Example (.NET C# )

Share RSCG_Wait

https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_Wait

In the same category (EnhancementProject) - 17 other generators

AutoInvoke.Generator

AutoSpectre

BuildInfo

CommandLine

Credfeto.Version.Information.Generator

Larcanum.GitInfo

LinqGen.Generator

Pekspro.BuildInformationGenerator

PlantUmlClassDiagramGenerator

RSCG_AMS

RSCG_ExportDiagram

RSCG_FunctionsWithDI

RSCG_NameGenerator

RSCG_TimeBombComment

ThisAssembly

ThisAssembly.Constants

ThisAssembly.Metadata