sraer Emne 3 c#

This commit is contained in:
Geir Okkenhaug Jerstad 2024-11-12 18:58:11 +01:00
parent 0d48ecd36c
commit 1e66eb74ff
30 changed files with 322 additions and 2 deletions

View file

@ -38,7 +38,7 @@ function addBikeview() {
<input type="number" onchange="model.input.newBike.gears = this.value">
</div>
<div>
Er sykkelen tigjengelig<input type="checkbox" checked="checked" onclick="model.input.newBike.isAvailable = this.value">Ja</button>
Er sykkelen tigjengelig<input type="checkbox" checked="" onclick="model.input.newBike.isAvailable = this.value">Ja</button>
<input type="checkbox" checked="" onclick="model.input.newBike.isAvailable = this.value">Nei</button>
</div>
<div>

1
Emne 3/.envrc Normal file
View file

@ -0,0 +1 @@
use nix

14
Emne 3/shell.nix Normal file
View file

@ -0,0 +1,14 @@
# shell.nix
with import <nixpkgs> {};
mkShell {
name = "dotnet-env";
packages = [
(with dotnetCorePackages; combinePackages [
sdk_6_0
sdk_7_0
sdk_8_0
sdk_9_0
])
];
}

2
Emne 3/test/Program.cs Normal file
View file

@ -0,0 +1,2 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

BIN
Emne 3/test/bin/Debug/net6.0/test Executable file

Binary file not shown.

View file

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

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
}
}
}

View file

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

Binary file not shown.

Binary file not shown.

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("test")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0d48ecd36c784dc17779f6ea5d2c2ee92229f638")]
[assembly: System.Reflection.AssemblyProductAttribute("test")]
[assembly: System.Reflection.AssemblyTitleAttribute("test")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View file

@ -0,0 +1 @@
fa1090383c7e9468c712b99ada208132ba266a2c4ee621946e799a1f8a8ef25e

View file

@ -0,0 +1,15 @@
is_global = true
build_property.TargetFramework = net6.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 = test
build_property.ProjectDir = /home/geir/code/startit/Emne 3/test/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 6.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 @@
efee7a292436d1551f7324d4cb434e20ebd4961bf658768cef30abef989affa8

View file

@ -0,0 +1,14 @@
/home/geir/code/startit/Emne 3/test/bin/Debug/net6.0/test
/home/geir/code/startit/Emne 3/test/bin/Debug/net6.0/test.deps.json
/home/geir/code/startit/Emne 3/test/bin/Debug/net6.0/test.runtimeconfig.json
/home/geir/code/startit/Emne 3/test/bin/Debug/net6.0/test.dll
/home/geir/code/startit/Emne 3/test/bin/Debug/net6.0/test.pdb
/home/geir/code/startit/Emne 3/test/obj/Debug/net6.0/test.GeneratedMSBuildEditorConfig.editorconfig
/home/geir/code/startit/Emne 3/test/obj/Debug/net6.0/test.AssemblyInfoInputs.cache
/home/geir/code/startit/Emne 3/test/obj/Debug/net6.0/test.AssemblyInfo.cs
/home/geir/code/startit/Emne 3/test/obj/Debug/net6.0/test.csproj.CoreCompileInputs.cache
/home/geir/code/startit/Emne 3/test/obj/Debug/net6.0/test.dll
/home/geir/code/startit/Emne 3/test/obj/Debug/net6.0/refint/test.dll
/home/geir/code/startit/Emne 3/test/obj/Debug/net6.0/test.pdb
/home/geir/code/startit/Emne 3/test/obj/Debug/net6.0/test.genruntimeconfig.cache
/home/geir/code/startit/Emne 3/test/obj/Debug/net6.0/ref/test.dll

Binary file not shown.

View file

@ -0,0 +1 @@
0aeb3fc94929053dd3e8a02fe7483ffd8e9599b88c7b8f3dafb2aeff4770ae76

Binary file not shown.

View file

@ -0,0 +1,86 @@
{
"version": 3,
"targets": {
"net6.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net6.0": []
},
"packageFolders": {
"/home/geir/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/geir/code/startit/Emne 3/test/test.csproj",
"projectName": "test",
"projectPath": "/home/geir/code/startit/Emne 3/test/test.csproj",
"packagesPath": "/home/geir/.nuget/packages/",
"outputPath": "/home/geir/code/startit/Emne 3/test/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/geir/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "all"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[6.0.35, 6.0.35]"
},
{
"name": "Microsoft.NETCore.App.Host.linux-x64",
"version": "[6.0.35, 6.0.35]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[6.0.35, 6.0.35]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/nix/store/jkh0ali7w1ikrz7d9rbh2hdp52gdy8mn-dotnet-sdk-9.0.100-rc.2.24474.11/sdk/9.0.100-rc.2.24474.11/RuntimeIdentifierGraph.json"
}
}
}
}

View file

@ -0,0 +1,12 @@
{
"version": 2,
"dgSpecHash": "eAulN7AMGw0=",
"success": true,
"projectFilePath": "/home/geir/code/startit/Emne 3/test/test.csproj",
"expectedPackageFiles": [
"/home/geir/.nuget/packages/microsoft.netcore.app.ref/6.0.35/microsoft.netcore.app.ref.6.0.35.nupkg.sha512",
"/home/geir/.nuget/packages/microsoft.aspnetcore.app.ref/6.0.35/microsoft.aspnetcore.app.ref.6.0.35.nupkg.sha512",
"/home/geir/.nuget/packages/microsoft.netcore.app.host.linux-x64/6.0.35/microsoft.netcore.app.host.linux-x64.6.0.35.nupkg.sha512"
],
"logs": []
}

View file

@ -0,0 +1,81 @@
{
"format": 1,
"restore": {
"/home/geir/code/startit/Emne 3/test/test.csproj": {}
},
"projects": {
"/home/geir/code/startit/Emne 3/test/test.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/geir/code/startit/Emne 3/test/test.csproj",
"projectName": "test",
"projectPath": "/home/geir/code/startit/Emne 3/test/test.csproj",
"packagesPath": "/home/geir/.nuget/packages/",
"outputPath": "/home/geir/code/startit/Emne 3/test/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/geir/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "all"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[6.0.35, 6.0.35]"
},
{
"name": "Microsoft.NETCore.App.Host.linux-x64",
"version": "[6.0.35, 6.0.35]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[6.0.35, 6.0.35]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/nix/store/jkh0ali7w1ikrz7d9rbh2hdp52gdy8mn-dotnet-sdk-9.0.100-rc.2.24474.11/sdk/9.0.100-rc.2.24474.11/RuntimeIdentifierGraph.json"
}
}
}
}
}

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/geir/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/geir/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/geir/.nuget/packages/" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

10
Emne 3/test/test.csproj Normal file
View file

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View file

@ -8,7 +8,6 @@ let string2 = "The quick brown fox jumps over the lazy dog"
function isPangram(str) {
const lowerStr = str.toLowerCase();
if (letters.split('').every(char => lowerStr.includes(char))){
console.log('ja')
return true;