Silverlight – System Information Recovery

ThSilverlight Developmentere might be times when building Silverlight applications, when you need to display information like the system configuration, current URL, product name, etc. This can become a little difficult to integrate, unless you already have a logging system that writes this information to a file serving the purposes of troubleshooting references for developers.

In this post, we try to shed light on how you can retrieve the above said information by creating and using a new Silverlight class. The class that we are talking about incorporates information from the execution assembly, the Environment class and a few other classes. We begin with the Constructor for this class that retrieves information, such as copyright, title, company, and description information. This is possible using the Application.Current.GetType() method. You can now use a variable to tag this information to.

Assembly information that is entered using Visual Studio, can be retrieved at runtime using the main assembly object and calling the GetCustomAttributes() method. You can then pass a descriptor type (Company, Product, etc.) to this method. The operating system and version can be easily traced using the associated properties of the Environment class.

Next up, you can derive the current URL on the user’s machine. This is pretty easy using the System.Windows.Browser.HtmlPage class and accessing the Document.DocumentUri property. Now the StackFrame class allows you to retrieve the Stack Trace, completing the list of information required. Alternatively, you can also use the GetAllSystemInfo() to pull all the above information in a concatenated string and copying it to a file.

When it comes to Microsoft Silverlight development, we at GoodCore believe in delivering nothing, but the highest level of quality by hiring Silverlight developers possessing extensive skills. Being a best-of-the-breed offshore software development company, GoodCore prides itself at nurturing a rich talent pool that allows you to hire silverlight programmers from us. Having developed numerous applications for clients worldwide, and with their invaluable positive feedback enriching our experience and expertise, we are poised to develop and deliver state-of-the-art Microsoft Silverlight-based web applications. So if you are looking to hire Silverlight developers, look no further than GoodCore, a Microsoft Silverlight development force to reckon with!

  1. No comments yet.

Leave a reply

 
 
 


− three = 6