Around and About .NET World

Il blog di Marco Minerva
posts - 1671, comments - 2232, trackbacks - 2135

My Links

News

Contattami su Live Messenger:


MCTS: Windows, Web, Distributed Applications & SQL Server

MCPD: Enterprise Applications

Tag Cloud

Archives

Post Categories

Links

lunedì 2 giugno 2008

Expression Encoder 2 SDK

The Expression Encoder 2 SDK includes documentation, samples, and code to help you work with the Expression Encoder object model and extend the functionality of Expression Encoder 2.

L'SDK può essere utilizzato con Visual Studio 2008, Visual C# Express 2008 o Visual C++ Express 2008 . Il download è disponibile qui.

Technorati Tag: ,


posted @ lunedì 1 gennaio 0001 00:00 | Feedback (0) | Filed Under [ C# VB .NET Orcas & .NET 3.5 ]

Nuova CTP per le Parallel Extensions di .NET 3.5

Parallel Extensions to the .NET Framework is a managed programming model for data parallelism, task parallelism, and coordination on parallel hardware unified by a common work scheduler. Parallel Extensions makes it easier for developers to write programs that scale to take advantage of parallel hardware by providing improved performance as the numbers of cores and processors increase without having to deal with many of the complexities of today’s concurrent programming models.

E' stata rilasciata una nuova CTP di questa libreria, scaricabile gratuitamente da qui. Ne approfitto per ricordare che già da un po' di tempo Microsoft ha riservato un'apposita sezione di MSDN al calcolo parallelo, denominata Parallel Computing Developer Center.


posted @ lunedì 1 gennaio 0001 00:00 | Feedback (0) | Filed Under [ C# VB .NET Orcas & .NET 3.5 ]

Recuperare il chiamante di un metodo

In alcuni casi può essere necessario conoscere il nome del metodo che ha richiamato una certa routine. Ad esempio, per creare un meccanismo di logging in cui un ipotitetico metodo WriteLog scrive, tra le altre informazioni, anche il nome della funzione che lo ha invocato. Per fare questo, basta analizzare il contenuto dello Stack Trace:

 

1 StackTrace stackTrace = new StackTrace(); 2 StackFrame stackFrame = stackTrace.GetFrame(1); 3 MethodBase methodBase = stackFrame.GetMethod(); 4 string methodName = methodBase.Name;

L'istruzione numero 2 recupera il primo stack frame, contenente il riferimento al metodo che ha richiamato la routine attualmente in esecuzione. Se, invece del numero 1, si utilizza, ad esempio, 2, si ottiene il riferimento al secondo stack frame, da cui è possibile recuperare il metodo che ha richiamato il metodo che ha invocato la routine attuale... E così via.

Technorati Tag: ,,


posted @ lunedì 1 gennaio 0001 00:00 | Feedback (1) | Filed Under [ C# ]

Powered by:
Powered By Subtext Powered By ASP.NET