Archive for April, 2009
Who calls me?
When we need to write the caller information in the log file we usually write a call like this:
_log.Error(“ThisClass.ThisMethod”, ex.Message);
The specification of the caller class and method is convenient to have information about the error location, but writing that string all the time is boring.
Searching in the .NET Class Library I found the class StackFrame that enable the program to access the application stack, so I write this piece of code:
public void Error(Exception ex) { StackFrame sf = new StackFrame(1); _log.Error( String.Concat(sf.GetMethod().DeclaringType.FullName, ".", sf.GetMethod().Name), ex.Message); }
This method navigate the stack up one level and using the StackFrame extract the caller class and the caller method and write them to the log file.
Maybe many of you already knows the StackFrame class, but the .NET Fx is big and while searching in it you always find something interesting.
No commentsBlend3 preview does not show the design view
I’m trying Blend3 preview on an quite big project and all the windows and user controls were available only in XAML view while the design view was disabled.
I post a question on the blend forum and after a mail to Unni Ravindranathan he have found the solution.
You must open the .csprj file with notepad and add this element as a child of PropertyGroup:
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Maybe the problem is because the project is quite old and I created it with Visual Studio 2008 without SP1.
No commentsThe sessions are online, now it’s time to vote
After two months in which we collected the sessions proposal for the next UgiALT.NET conference, today we published the list and opened the poll for vote your preferred sessions.
We are very satisfied about the collected sessions, 18 proposals on variuous arguments all with something very interesting.
Some of the arguments are: Mono, XNA, Rhino ETL, UIX design, CI, Spring.NET, Scrum, etc…
So now it’s time to vote your five preferred sessions and wait until the 27 June to came to listen and discuss with us.
You can vote here: http://groups.yahoo.com/group/ugialtnet/surveys?id=12895553 and get more information here: http://ugialt.net/IV_UgiAltNetConf.ashx
No comments
RSS


