Docsity
Docsity

Prepara tus exámenes
Prepara tus exámenes

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity


Consigue puntos base para descargar
Consigue puntos base para descargar

Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium


Orientación Universidad
Orientación Universidad


Asp.NET Core 3: Lifetime de instancias de clases y bundling y minificación, Apuntes de Programación Funcional

En este documento se explica el manejo de la vida útil de las instancias de clases mediante el contenedor de inyección de dependencias en asp.net core 3. Se describen los tipos de vida: transient, scoped y singleton. Además, se presenta la configuración de bundling y minificación de archivos css.

Tipo: Apuntes

2019/2020

Subido el 31/10/2020

josh-doe
josh-doe 🇩🇴

3 documentos

1 / 1

Toggle sidebar

Esta página no es visible en la vista previa

¡No te pierdas las partes importantes!

bg1
ASP.NET CORE 3
Dependency Injection Object Lifetime
The lifetime of a class instance is managed by the container.
Transient Lifetime: New instance of the object is created every time it is asked for.
Scoped Lifetime: The instance will until the request is completely handled
Singleton Instance: A single instance will be created and supplied until the app closes.
Bundling and Minification:
// Configure bundling and minification for the project.
// More info at https://go.microsoft.com/fwlink/?LinkId=808241
[
{
"outputFileName": "wwwroot/css/all.min.css",
// An array of relative input file paths. Globbing patterns
supported
"inputFiles": [
"wwwroot/lib/bootstrap/dist/css/bootstrap.css",
"wwwroot/css/site.css"
]
},
{
"outputFileName": "wwwroot/css/bootstrap.css",
// An array of relative input file paths. Globbing patterns
supported
"inputFiles": [
"wwwroot/lib/bootstrap/dist/css/bootstrap.css"
],
"minify": {
"enabled": false
}
}
]

Vista previa parcial del texto

¡Descarga Asp.NET Core 3: Lifetime de instancias de clases y bundling y minificación y más Apuntes en PDF de Programación Funcional solo en Docsity!

ASP.NET CORE 3

Dependency Injection Object Lifetime

The lifetime of a class instance is managed by the container.

Transient Lifetime: New instance of the object is created every time it is asked for.

Scoped Lifetime: The instance will until the request is completely handled

Singleton Instance: A single instance will be created and supplied until the app closes.

Bundling and Minification:

// Configure bundling and minification for the project. // More info at https://go.microsoft.com/fwlink/?LinkId= [ { "outputFileName": "wwwroot/css/all.min.css", // An array of relative input file paths. Globbing patterns supported "inputFiles": [ "wwwroot/lib/bootstrap/dist/css/bootstrap.css", "wwwroot/css/site.css" ] }, { "outputFileName": "wwwroot/css/bootstrap.css", // An array of relative input file paths. Globbing patterns supported "inputFiles": [ "wwwroot/lib/bootstrap/dist/css/bootstrap.css" ], "minify": { "enabled": false } } ]