npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vox-core-clr

v0.0.9

Published

Utilice ensamblados y compile código .NET (Framework 4 , Mono)

Downloads

6

Readme

vox-core-clr

NOTICIA: vox-core-clr es parte de vox-core, y por tanto se ejecuta sobre vox-core. Si usted ya tiene instalado vox-core no descargue este módulo, puesto que vox-core ya tiene incluido este módulo. Si desea usar este módulo sin instalar vox-core por favor instale voxnode-clr

VoxSoftware está creando módulos independientes de cada parte de vox-core utilizando el prefijo voxnode- en lugar de usar vox-core-. Por lo tanto si desea usar alguno de los submódulos presentes en vox-core, de manera independiente revise utilizando este prefijo.

vox-core-clr ==> voxnode-clr

vox-core-clr permite usar Tipos y Ensamblados .NET desde nodejs. vox-core-clr tiene las siguientes ventajas sobre edge.js

  • No tiene que compilarse. vox-core-clr crea un canal de comunicación entre .NET y nodejs
  • Permite usar clases ya predeterminadas de .NET sin tener que compilar código fuente C# u otro lenguaje
  • Los métodos devuelven tareas asíncronas (Similares a Promises, compatibles con async/await: Regenerator de facebook y vox-core-es6 de vox-core)

vox-core-clr tiene ciertas características más:

  • Permite compilar código fuente C#
  • Permite cargar ensamblados por nombre y por archivo
  • Permite utilizar cualquiera de las sobrecargas de un método
  • Permite obtener y ajustar valores de propiedades con índices

Dependencias

Debe instalar .NET Framework 4.0 en Windows (en versiones recientes viene preinstalado), o Mono en sistemas Unix

Cambios

Documentación

Incluye las siguientes clases:

Ejemplo

Este ejemplo usa sintaxis ES6 y async/await. Se puede usar un transpilador como babel, o ejecutar directamente con vox-core creando un archivo con extensión .es6

var clr= new core.VW.Clr.Manager()
var test= async function(){
	// Esta parte se demora un poco mientras se carga por completo el canal de comunicación
	await clr.loadAssembly("System.Xml")

	// La primera vez se demora un poco más porque carga los miembros de los tipos
	var d= new Date()
	await testxml()
	console.info("Time: ", new Date()-d)
	
	var d= new Date()
	await testxml()
	console.info("Time: ", new Date()-d)

	var d= new Date()
	await testxmlScope()
	console.info("Time: ", new Date()-d)
	
	var d= new Date()
	await testxmlScope()
	console.info("Time: ", new Date()-d)

	await clr.close()
	process.exit(0)
}




var testxml= async function(){
	try{
		

		var Xml= {}
		// Cargar los tipos ...
		Xml.Document= clr.get("System.Xml.XmlDocument")
		await Xml.Document.loadMembers()
		var doc= await Xml.Document.create()
		var root= await doc.CreateXmlDeclaration("1.0","utf8","yes")		
		await doc.AppendChild(root)
		var elemento1= await doc.CreateElement("element1")
		var elemento2= await doc.CreateElement("element2")
		await elemento1.AppendChild(elemento2)
		await elemento2.setInnerText("Hola mundo!")
		await doc.AppendChild(elemento1)
		console.info(await doc.getOuterXml())	

		var tasks=[root.dispose(), elemento1.dispose(),
			elemento2.dispose(), doc.dispose()]

		await core.VW.Task.waitMany(tasks)
	}
	catch(er){
		console.error(er)
	}
}


var testxmlScope= async function(){
	try{
		

		var Xml= {}
		// Cargar los tipos ...
		var scope= clr.beginScope()
		Xml.Document= clr.get("System.Xml.XmlDocument")
		await Xml.Document.loadMembers()

		var doc= await scope(Xml.Document).create()
		var root= await scope(doc).CreateXmlDeclaration("1.0","utf8","yes")		
		await doc.AppendChild(root)

		var elemento1= await doc.CreateElement("element1")
		var elemento2= await doc.CreateElement("element2")
		await elemento1.AppendChild(elemento2)
		await elemento2.setInnerText("Hola mundo!")
		await doc.AppendChild(elemento1)

		console.info(await doc.getOuterXml())
		await scope.end()
	}
	catch(er){
		console.error(er)
	}
}

test()