RSCG – RSCG_Wait

RSCG – RSCG_Wait
 
 

name RSCG_Wait
nuget https://www.nuget.org/packages/RSCG_WaitAndOptions/
link https://github.com/ignatandrei/RSCG_WaitAndOptions
author Andrei Ignat

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

 

This is how you can use RSCG_Wait .

The code that you start with is


<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>


The code that you will use is


// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
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);
Console.WriteLine(RSCG_Wait.OptionsFromBuild.build_property_rootnamespace);
Console.WriteLine(RSCG_Wait.OptionsFromBuild.build_property__supportedplatformlist );


 

The code that is generated is

//------------------------------------------------------------------------------
// <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.invariantglobalization
public static string build_property_invariantglobalization => @"";
//real name: build_property.platformneutralassembly
public static string build_property_platformneutralassembly => @"";
//real name: build_property.projectdir
public static string build_property_projectdir => @"D:\gth\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
//------------------------------------------------------------------------------
// <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;
partial class MyGeneratedCode
{
    public static string DateEnd => "2/24/2024 7:58:07 PM";
    
}
//------------------------------------------------------------------------------
// <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>
//------------------------------------------------------------------------------
#nullable enable
namespace RSCG_Wait;
//pragma warning disable CS1591
[global::System.CodeDom.Compiler.GeneratedCode("RSCG_Wait", "2024.2.24.1940")]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
partial class MyGeneratedCode
{
    public static string DateStart => "2/24/2024 7:57:57 PM";
    public static int SecondsToWait=10;
}
#nullable restore

Code and pdf at

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