Skip to content

Communities

Create Restful WCF Service API

C-Sharpcorner - Latest Articles - Mon, 08/30/2010 - 05:56
In this article I am going to explain you how to implement restful service API using WCF 4.0 . The Created API returns XML and JSON data using WCF attribute.
Categories: Communities

HelpProvider in C#

C-Sharpcorner - Latest Articles - Mon, 08/30/2010 - 04:24
HelpProvider control provides popup or online help for a control. In this article, we will discuss how to use a HelpProvider control to implement help for controls in a Windows Forms application.
Categories: Communities

RichTextBox in C#

C-Sharpcorner - Latest Articles - Mon, 08/30/2010 - 02:53
A RichTextBox control is an advanced text box that provides text editing and advanced formatting features including loading rich text format (RTF) files. In this article, I will demonstrates how create and use various features of Windows Forms RichTextBox control.
Categories: Communities

Validating Code Rules in Visual Studio

One popular aspect of the tool NDepend is the integration of the tool into the Continuous Integration build process. Every morning the team leader gets an up-to-date report telling if some coding rules written with CQL have been violated within the last 24h.

With NDepend v3 integrated in Visual Studio 2010, 2008 and 2005, we wanted to provide a smoother answer to the critical scenario of when a developer violates a rule. We think that waiting till the day after to discover that a rules get violated is too long, it is not enough agile-oriented. We wanted CQL rules violation being obviously warned as soon as possible, right within Visual Studio.

The idea of what we’ve done with NDepend v3 is that all CQL rules get checked into Visual Studio as soon as one or several VS projects have been (re)compiled.

The developer gets permanently informed of CQL rules validation status thanks to a progress circle we added in the bottom-right corner of the Visual Studio window.

  •   green, means that all CQL rules are validated,
  •   yellow, means some activated CQL rules are violated, 
  •   red, means some activated CQL rules don’t compile and (eventually) some activated CQL rules are violated, 
  •   blue + progressing, means that the code is currently analyzed by NDepend,
  •   grey, means that no NDepend project is currently loaded in VisualStudio. 

Hovering the circle with the mouse shows a form summarizing all CQL rules status + a pointer to Show CQL Explorer panel:


The CQL Explorer lists all rules grouped by categories…



…and by clicking a rule you can jump to the CQL edition Windows, where you can edit the rule and see culprit methods or classes that violate the rule.


Of course double clicking a culprit method or class lets jump to its source code declaration. And if the application analyzed by NDepend spawns several VS solutions, and these solutions are currently opened in several VS instances, the code element gets edited within the adequate VS instance, the one that contains the VS solution that contains the code element. This behavior at first glance might surprise and even look like a bug. But with the habits it becomes a powerful time-saver trick. And this multi-VS-instances communication trick is made possible thanks to the Application-Wide code analysis of NDepend.

 

CQL rules validation phase is fast. The performance challenge was to make this happens almost instantly to avoid slowing the developer machine. Hopefully for a large 100K Lines of Code application, code gets re-analyzed and 200 CQL rules can get checked, all within 3 seconds after the (re)compilation of one or several .NET assemblies. These fast performances were made possible thanks to the development of a new technology of incremental code analysis. With incremental code analysis, only modified code gets re-analyzed. I can attest that this was extremely challenging and complex development!

Finally, in the form shown on progress circle hovering with mouse, there are 2 links Analysis Execution and Analysis Refresh in VS.

  • The option panel Analysis Refresh in VS let’s customize when an NDepend analysis should occurs.

  • The option panel Analysis Execution let’s finally customize the analysis process (incremental/full analysis, in/out process, report generation…).

 

Something that we are thinking of implementing for the future would be an option to forbid check-in if not all CQL rules are green. The development complexity comes from the multitude of Source File Management technologies (including TFS) to support. Any comment on this potential feature is welcomed dear reader.

Categories: Communities

GridView Sorting, Paging without using Session, ViewState or Cache

C-Sharpcorner - Latest Articles - Sun, 08/29/2010 - 09:29
In this article you will learn how to use GridView Sorting, Paging without using Session, ViewState or Cache.
Categories: Communities

Create Rupee (INR) symbol for keyboard

C-Sharpcorner - Latest Articles - Sun, 08/29/2010 - 07:59
Indian Rupee symbol has been launched but we still use rupee or INR. Because we don’t have current rupees symbol in our keyboard so what? Should we have to wait for that? The answer is NO, we are the developers and we can’t wait at all. So here I am showing you how to create Rupee symbol to include it in system char map.
Categories: Communities

Google Ajax Search API with different techniques

C-Sharpcorner - Latest Articles - Sat, 08/28/2010 - 06:13
In this article I am showing you the all search techniques of Google.
Categories: Communities

ServiceController in C#

C-Sharpcorner - Latest Articles - Sat, 08/28/2010 - 02:34
A ServiceController component allows us to access and manage Windows Services running on a machine. In this article, I will discuss how to a ServiceController class to load all services and get information about them in a Windows Forms application using Visual Studio 2010.
Categories: Communities

Consuming URL Shortening Services - Tweetburner (twurl)

C-Sharpcorner - Latest Articles - Fri, 08/27/2010 - 21:51
Just another article of the URL shortening services series. Today, we are going to talk about another hot and easy-to-use service, it's Tweetburner. If you haven't used it before, then it's the time to. We’re going to discuss how to use Tweetburner first. After that, we’ll inspect its API and learn how to use it in your .NET application.
Categories: Communities

Div and Web Design

C-Sharpcorner - Latest Articles - Fri, 08/27/2010 - 15:29
If you develop web applications then surely you know about the Div tag but many of you guys never have a usuful look on it. As i know div tag is the backbone of a consistent css used website. Basically div is a section you can say which separate the sections in a webpage. But div not only separate the contents but it also provides the different formating for each section.
Categories: Communities

How you can use csv file as data source of gridview

C-Sharpcorner - Latest Articles - Fri, 08/27/2010 - 08:13
Here I will show how you can use csv file as data source of gridview.
Categories: Communities

How to change Web Page Background Image from FileUpload Control

C-Sharpcorner - Latest Articles - Fri, 08/27/2010 - 07:53
This article will guide you on how to change the background image of any asp.net web page by using a file upload control.
Categories: Communities

How to do Paging in a TreeView Control in Silverlight

C-Sharpcorner - Latest Articles - Fri, 08/27/2010 - 00:26
The TreeView in Silverlight is a powerful way to show hierarchical data. This article describe how to add paging inside the hierarchy of your treeview.
Categories: Communities

Notify Icon in C#

C-Sharpcorner - Latest Articles - Thu, 08/26/2010 - 17:02
In this article, I will discuss how to add a system tray icon for an application using the NotifyIcon in a Windows Forms application using Visual Studio 2010.
Categories: Communities

Consuming URL Shortening Services - is.gd

C-Sharpcorner - Latest Articles - Thu, 08/26/2010 - 14:43
Another article of our series that talks about accessing URL shortening services programmatically. This article is talking about is.gd shortening service, how you can use it, and how to access it via your C#/VB.NET application.
Categories: Communities

Performance Tuning High Level- SQL SERVER

C-Sharpcorner - Latest Articles - Thu, 08/26/2010 - 09:08
You can view the query execution plan while executing the query in your query analyzer. Through that you can tune your query. It will show you whether the appropriate tables are using the proper index or not.
Categories: Communities

Silverlight CRUD Operations Using WCF Service

C-Sharpcorner - Latest Articles - Thu, 08/26/2010 - 07:39
This articles will demonstrates how to use Silverlight CRUD operations using WCF service. We are going to use Data Grid data control.
Categories: Communities

How to play with Windows Phone 7 Emulator

C-Sharpcorner - Latest Articles - Thu, 08/26/2010 - 07:07
In this article I will be talking about How to play with Windows Phone 7 Emulator.
Categories: Communities

Share Point Designer Work Flow: Part IV

C-Sharpcorner - Latest Articles - Thu, 08/26/2010 - 06:23
In this article I am explaining, how to update a list item using share point designer.
Categories: Communities

Singleton Design Pattern in C#

C-Sharpcorner - Latest Articles - Thu, 08/26/2010 - 05:31
Design Patterns provide solutions to common recurring problems. Design patterns can be classified as creational, structural or behavioral .Singleton and Factory patterns are two of the creational pattern.Here we will discuss these two patterns.
Categories: Communities