Codice di base importato

This commit is contained in:
La Programmatrice Verde 2025-05-21 16:01:31 +02:00
parent f7de842578
commit edf9e69a0c
20 changed files with 181 additions and 4 deletions

View File

@ -1,9 +1,85 @@
namespace es_microsoft;
class Program
class Program {
static void Main(string[] args) {
string[][] userEnteredValues = new string[][]
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
new string[] { "1", "2", "3"},
new string[] { "1", "two", "3"},
new string[] { "0", "1", "2"}
};
string overallStatusMessage = "";
overallStatusMessage = Workflow1(userEnteredValues);
if (overallStatusMessage == "operating procedure complete") {
Console.WriteLine("'Workflow1' completed successfully.");
}
else {
Console.WriteLine("An error occurred during 'Workflow1'.");
Console.WriteLine(overallStatusMessage);
}
static string Workflow1(string[][] userEnteredValues) {
string operationStatusMessage = "good";
string processStatusMessage = "";
foreach (string[] userEntries in userEnteredValues) {
processStatusMessage = Process1(userEntries);
if (processStatusMessage == "process complete") {
Console.WriteLine("'Process1' completed successfully.");
Console.WriteLine();
}
else {
Console.WriteLine("'Process1' encountered an issue, process aborted.");
Console.WriteLine(processStatusMessage);
Console.WriteLine();
operationStatusMessage = processStatusMessage;
}
}
if (operationStatusMessage == "good") {
operationStatusMessage = "operating procedure complete";
}
return operationStatusMessage;
}
static string Process1(String[] userEntries) {
string processStatus = "clean";
string returnMessage = "";
int valueEntered;
foreach (string userValue in userEntries) {
bool integerFormat = int.TryParse(userValue, out valueEntered);
if (integerFormat == true) {
if (valueEntered != 0) {
checked {
int calculatedValue = 4 / valueEntered;
}
}
else {
returnMessage = "Invalid data. User input values must be non-zero values.";
processStatus = "error";
}
}
else {
returnMessage = "Invalid data. User input values must be valid integers.";
processStatus = "error";
}
}
if (processStatus == "clean") {
returnMessage = "process complete";
}
return returnMessage;
}
}
}

BIN
bin/Debug/net9.0/es_microsoft Executable file

Binary file not shown.

View File

@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v9.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v9.0": {
"es_microsoft/1.0.0": {
"runtime": {
"es_microsoft.dll": {}
}
}
}
},
"libraries": {
"es_microsoft/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net9.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "9.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]

BIN
obj/Debug/net9.0/apphost Executable file

Binary file not shown.

View File

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("es_microsoft")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f7de842578b3a781c70401e9cda7d4a76775c93f")]
[assembly: System.Reflection.AssemblyProductAttribute("es_microsoft")]
[assembly: System.Reflection.AssemblyTitleAttribute("es_microsoft")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@ -0,0 +1 @@
56ed7301782671e005aca5beb135364494d106475fc78ab1890b2ca1c798aa82

View File

@ -0,0 +1,15 @@
is_global = true
build_property.TargetFramework = net9.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = es_microsoft
build_property.ProjectDir = /home/Verde/git/es_microsoft/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 9.0
build_property.EnableCodeStyleSeverity =

View File

@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

Binary file not shown.

View File

@ -0,0 +1 @@
2be6b779e5cb4966fd7ebfdacfb509b07222b8b6baaedce0324029f937a44052

View File

@ -0,0 +1,14 @@
/home/Verde/git/es_microsoft/bin/Debug/net9.0/es_microsoft
/home/Verde/git/es_microsoft/bin/Debug/net9.0/es_microsoft.deps.json
/home/Verde/git/es_microsoft/bin/Debug/net9.0/es_microsoft.runtimeconfig.json
/home/Verde/git/es_microsoft/bin/Debug/net9.0/es_microsoft.dll
/home/Verde/git/es_microsoft/bin/Debug/net9.0/es_microsoft.pdb
/home/Verde/git/es_microsoft/obj/Debug/net9.0/es_microsoft.GeneratedMSBuildEditorConfig.editorconfig
/home/Verde/git/es_microsoft/obj/Debug/net9.0/es_microsoft.AssemblyInfoInputs.cache
/home/Verde/git/es_microsoft/obj/Debug/net9.0/es_microsoft.AssemblyInfo.cs
/home/Verde/git/es_microsoft/obj/Debug/net9.0/es_microsoft.csproj.CoreCompileInputs.cache
/home/Verde/git/es_microsoft/obj/Debug/net9.0/es_microsoft.dll
/home/Verde/git/es_microsoft/obj/Debug/net9.0/refint/es_microsoft.dll
/home/Verde/git/es_microsoft/obj/Debug/net9.0/es_microsoft.pdb
/home/Verde/git/es_microsoft/obj/Debug/net9.0/es_microsoft.genruntimeconfig.cache
/home/Verde/git/es_microsoft/obj/Debug/net9.0/ref/es_microsoft.dll

Binary file not shown.

View File

@ -0,0 +1 @@
c085ced4f66816c1965ad7037a9f6eb131b43a1283d17d379c08ae9082e5e175

Binary file not shown.

Binary file not shown.

Binary file not shown.