Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Ureche Constantin-Adrian/L01/Steam.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Steam este un serviciu de distributie digitala pentru jocuri video.
Acesta s-a extins si intr-o vitrina digitala online și mobila online.
Steam ofera servicii de gestionare a drepturilor digitale (DRM), gazduire server, streaming video si servicii de retele sociale .
De asemenea, ofera utilizatorului instalarea si actualizarea automata a jocurilor si caracteristici ale comunitatii, cum ar fi listele si grupurile de prieteni, stocarea în cloud și functionalitatea de voce si chat în joc.
Valve a inclus suport beta pentru Steam Cloud Play in mai 2020, pentru ca dezvoltatorii să permita utilizatorilor sa joace jocuri în biblioteca lor, pe care dezvoltatorii si editorii au optat sa le permita intr-un serviciu de jocuri cloud .
La lansare, Steam Cloud Play a functionat numai prin serviciul GeForce Now al Nvidia si s-ar conecta la alte servicii cloud în viitor.
7 changes: 7 additions & 0 deletions Ureche Constantin-Adrian/L02/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": []
}
46 changes: 46 additions & 0 deletions Ureche Constantin-Adrian/L02/Controllers/StudentsController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Models;
using Repositories;

namespace L02.Controllers
{
[ApiController]
[Route("[controller]")]
public class StudentsController : ControllerBase
{
[HttpGet]
public IEnumerable<Student> Get()
{
return StudentsRepo.Students;
}

[HttpGet("{id}")]
public Student GetStudent(int id)
{
return StudentsRepo.Students.FirstOrDefault(s => s.Id == id);
}

[HttpPost]
public void Post([FromBody] Student student)
{
StudentsRepo.Students.Add(student);
}

[HttpPut("{id}")]
public void Update(int id, [FromBody] Student student)
{
StudentsRepo.Students[StudentsRepo.Students.IndexOf(StudentsRepo.Students.FirstOrDefault(s => s.Id == id))] = student;
}

[HttpDelete("{id}")]
public void Delete(int id)
{
StudentsRepo.Students.RemoveAt(StudentsRepo.Students.IndexOf(StudentsRepo.Students.FirstOrDefault(s => s.Id == id)));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

namespace L02.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};

private readonly ILogger<WeatherForecastController> _logger;

public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
}

[HttpGet]
public IEnumerable<WeatherForecast> Get()
{
var rng = new Random();
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
})
.ToArray();
}
}
}
11 changes: 11 additions & 0 deletions Ureche Constantin-Adrian/L02/L02.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
</ItemGroup>

</Project>
13 changes: 13 additions & 0 deletions Ureche Constantin-Adrian/L02/Models/Student.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Models
{
public class Student
{
public int Id {get; set;}
public string Nume {get; set;}
public string Prenume {get; set;}
public string Facultate {get; set;}
public int An {get; set;}

}

}
26 changes: 26 additions & 0 deletions Ureche Constantin-Adrian/L02/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace L02
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}

public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
31 changes: 31 additions & 0 deletions Ureche Constantin-Adrian/L02/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:41650",
"sslPort": 44342
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"L02": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
16 changes: 16 additions & 0 deletions Ureche Constantin-Adrian/L02/Repositories/StudentsRepo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Collections.Generic;
using Models;


namespace Repositories
{
public class StudentsRepo
{
public static List<Student> Students = new List<Student>{
new Student() {Id = 1, Nume = "Popescu", Prenume = "Ion", Facultate = "AC", An = 2},
new Student() {Id = 2, Nume = "Ionescu", Prenume = "Alin", Facultate = "ETC", An = 3},
new Student() {Id = 3, Nume = "Basescu", Prenume = "Traian", Facultate = "Vietii", An = 5}
};
}

}
59 changes: 59 additions & 0 deletions Ureche Constantin-Adrian/L02/Startup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models;

namespace L02
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}

public IConfiguration Configuration { get; }

// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{

services.AddControllers();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "L02", Version = "v1" });
});
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "L02 v1"));
}

//app.UseHttpsRedirection();

app.UseRouting();

app.UseAuthorization();

app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}
15 changes: 15 additions & 0 deletions Ureche Constantin-Adrian/L02/WeatherForecast.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;

namespace L02
{
public class WeatherForecast
{
public DateTime Date { get; set; }

public int TemperatureC { get; set; }

public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);

public string Summary { get; set; }
}
}
9 changes: 9 additions & 0 deletions Ureche Constantin-Adrian/L02/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
10 changes: 10 additions & 0 deletions Ureche Constantin-Adrian/L02/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
24 changes: 24 additions & 0 deletions Ureche Constantin-Adrian/L03/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/net5.0/L03.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
42 changes: 42 additions & 0 deletions Ureche Constantin-Adrian/L03/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/L03.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/L03.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/L03.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
12 changes: 12 additions & 0 deletions Ureche Constantin-Adrian/L03/L03.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Apis.Drive.v3" Version="1.55.0.2453" />
</ItemGroup>

</Project>
Loading