Convert C# Into UnityScript - Events in Unityscript

Hello,

I’m trying to convert a piece of C# into JavaScript, but I came across some C# that I’ve never seen before, doesn’t even look syntax valid:

StoreKitManager.productListReceivedEvent += allProducts =>
		{
			Debug.Log( "received total products: " + allProducts.Count );
			_products = allProducts;
		};

What the heck does the ‘allProducts => {’ mean? It doesn’t even have a variable called ‘allProducts’, unless its referring to something within the StoreKitManager?

function Start()
{
StoreKitManager.productListReceivedEvent += RecicedProductList;
}

function RecicedProductList( List<StoreKitProduct> allProducts/* add parameter according to the "productListReceivedEvent"'s delegate)
{
   Debug.Log( "received total products: " + allProducts.Count );
   _products = allProducts;
  
}

I havent tested this code but 99% it should work. Also i added parameter thinking that it is Prime31 plugin… hope im right!!

Figured it out:

import System.Collections.Generic;

var  _products = List.<StoreKitProduct>();

function Start(){

	StoreKitManager.productListReceivedEvent += RecicedProductList;
	StoreKitBinding.requestProductData( productIdentifiers );
}

function RecicedProductList( allProducts : List.<StoreKitProduct> ){
	
   Debug.Log( "received total products: " + allProducts.Count );
   _products = allProducts;
 
}

I simply missed the brackets off at the end of the _products List.