CL.COMMON 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package CL.COMMON --version 1.0.3
NuGet\Install-Package CL.COMMON -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CL.COMMON" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CL.COMMON --version 1.0.3
#r "nuget: CL.COMMON, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CL.COMMON as a Cake Addin
#addin nuget:?package=CL.COMMON&version=1.0.3

// Install CL.COMMON as a Cake Tool
#tool nuget:?package=CL.COMMON&version=1.0.3

Acerca de CL.COMMON

Ofrece una serie de funciones a modo de utilería las cuales nos permiten realizar flujos que son habituales en todos los proyectos, como mapeo de genéricos, logs entre otros.

¿Qué resuelve?

La creación repetitiva de código de uso común a través de los distintos proyectos de los clientes y que a su vez en cada implementación presentan la posibilidad de no replicar el código con exactitud generando errores.

Rutinas de Core

GetConfigKeyValue:System.Data.String

  • System.Reflection.MethodBase _invoker:Usado para determinar que función ha llamado este método
  • System.String _configKey: Nombre de la llave en el config

Usado para acceder a configuraciones del web.config.

Ejemplo:

// Obtiene la llave del Web.config llamanda 'spGetNameDbObjectApp'
System.String valor = CL.COMMON.Core.GetConfigKeyValue(System.Reflection.MethodBase.GetCurrentMethod(), "spGetNameDbObjectApp");

FileToBase64:System.String

  • System.String _filePath: Ruta física del archivo

Usado para convertir un archivo en base64

Ejemplo:

// Convirtiendo un archivo a base64 System.String base64pdf = CL.COMMON.Core.FileToBase64("C:\mipdf.pdf");

GetExceptionMessage:System.String

  • System.Exception _exception: Objeto con la excepción a mapear

Obiene el detalle de la excepción y la retorna en un System.String.

Ejemplo:

// Mapeando la excepcion a un System.String
System.String message = CL.COMMON.Core.GetExceptionMessage(exception)

InflateObject:T

T:new(): Objeto que va a ser llenado con el System.Data.DataTable

  • System.Data.DataTable _dt: Origen de datos que van a ser cargados en T

Los registros de un query cargados en System.Data.DataTable serán cargados en el objeto de tipo T.

Ejemplo:

// Obtiene el modelo retornado por el datable
T oT = CL.COMMON.Core.InflateObject<T>(oDataTable);

InflateList:System.Collections.Generic.List<T>

T:new(): Objeto que va a ser llenado con el System.Data.DataTable

  • System.Data.DataTable _dt: Origen de datos que van a ser cargados en T

Los registros de un query serán mapeados a una lista de tipo T.

Ejemplo:

// Convirtiendo los registros de un datable a una lista de tipo T.
System.Collections.Generic.List<T> tList = CL.COMMON.Core.InflateList<T>(oDataTable);

ParametersBuilder:System.Collections.Generic.List<System.String>

T:new(): Objeto que va a ser mapeado a un query.

U:CL.STRUCTURES.INTERFACES.ICLMaster: I

  • System.String _invoker: Usado para determinar que métod ha invocado es función y podar dar el error respectivo en caso de...
  • T _object: Objeto del cual se van a mapear las propieadas a una lista.
  • System.String[] _toIgnore: Lista de propiedades a incluir/excluir según el tipo de inteface que indiquemos.

Convierte las propieades de un objeto a una lista de string.

// Convirtiendo las propiedades de un objeto a una lista.
System.String[] properties = CL.COMMON.Core.ParametersBuilder<T, V>(System.Reflection.MethodBase.GetCurrentMethod().Name, _object, _toIgnore)

Clavis Consultores ©

Product Compatible and additional computed target framework versions.
.NET Framework net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on CL.COMMON:

Package Downloads
CL.DB

Servicios para facilitar la manipulacion de las bases de datos

CL.SL

Librería que permite interactuar con service layer

CL.AUTH

Servicios para recuperacion y cambio de contraseñas

CL.UDFS

Implementación de udfs dinámicos

CL.PINPAD

Servicios para respado de transacciones pinpad

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.0 116 3/1/2024
1.3.1.1 105 2/2/2024
1.3.1 85 1/26/2024
1.3.0 84 1/19/2024
1.2.0 282 11/28/2023
1.1.0.2 151 10/3/2023
1.1.0.1 104 10/2/2023
1.1.0 183 9/18/2023
1.0.17 145 8/7/2023
1.0.16 193 5/12/2023
1.0.14 203 5/2/2023
1.0.13 188 4/12/2023
1.0.12 172 4/11/2023
1.0.11 279 2/20/2023
1.0.10 223 2/17/2023
1.0.9 214 2/17/2023
1.0.8 243 2/10/2023
1.0.6 253 2/9/2023
1.0.5 245 1/31/2023
1.0.4 268 1/31/2023
1.0.3 251 1/31/2023
1.0.2 255 1/25/2023
1.0.1 1,136 1/18/2023
1.0.0 795 1/17/2023