.Net Tools – PowerCommands for Visual Studio 2008

PowerCommands 1.1 is a set of useful extensions for the Visual Studio 2008 adding additional functionality to various areas of the IDE. The source code is included and requires the VS SDK for VS 2008 to allow modification of functionality or as a reference to create additional custom PowerCommand extensions

Its very useful tool for visual studio2008 specially  some features that Open command prompt, Copy Reference,  Email code snipet, Copy project as reference and many more.

Project Page:
http://code.msdn.microsoft.com/PowerCommands


License: Free
My Rank : 8.7

Some tools make life easier use it. bye now…

Advertisement

Ninject – Dependency Injector

Ninject is the ninja of dependency injectors.Ninject is a lightning-fast, ultra-lightweight dependency injector for .NET applications. It helps you split your application into a collection of loosely-coupled, highly-cohesive pieces, and then glue them back together in a flexible manner. By using Ninject to support your software’s architecture, your code will become easier to write, reuse, test, and modify.

Example of Code:

interface IWeapon
{
    void Hit(string target);
}
class Samurai
{
    private IWeapon _weapon;
 
    [Inject]
    public Samurai(IWeapon weapon)
    {
        _weapon = weapon;
    }
 
    public void Attack(string target)
    {
        _weapon.Hit(target);
    }
}
class WarriorModule : StandardModule {
  public override Load() {
    Bind<IWeapon>().To<Sword>();
    Bind<Samurai>().ToSelf();
  }
}
class Program
{
    public static void Main()
    {
        IKernel kernel = new StandardKernel(new WarriorModule());
        Samurai warrior = kernel.Get<Samurai>();
        warrior.Attack("the evildoers");
    }
}

..

My Rank is: 8.8

Project Home Page:
http://ninject.org/
Codeplex Home Page:
http://ninject.codeplex.com/
Download:for .NET Framework 2.0, 3.0, 3.5 version 1.0
http://ninject.org/assets/dist/Ninject-1.0-release-net-2.0.zip

You dont need to reinventing the wheel 🙂

Html Agility Pack – Rule the DOM

Html Agility Pack is one of best tool forcing DOM in .net by Codeplex.

What is exactly the Html Agility Pack (HAP)?

This is an agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT (you actually don’t HAVE to understand XPATH nor XSLT to use it, don’t worry…). It is a .NET code library that allows you to parse “out of the web” HTML files. The parser is very tolerant with “real world” malformed HTML. The object model is very similar to what proposes System.Xml, but for HTML documents (or streams).

Html Agility Pack now supports Linq to Objects (via a LINQ to Xml Like interface). Check out the new beta to play with this feature

Sample applications:

  • Page fixing or generation. You can fix a page the way you want, modify the DOM, add nodes, copy nodes, well… you name it.
  • Web scanners. You can easily get to img/src or a/hrefs with a bunch XPATH queries.
  • Web scrapers. You can easily scrap any existing web page into an RSS feed for example, with just an XSLT file serving as the binding. An example of this is provided.

Example Code:

HtmlDocument doc = new HtmlDocument();
 doc.Load("file.htm");
 foreach(HtmlNode link in doc.DocumentElement.SelectNodes("//a[@href"])
 {
    HtmlAttribute att = link["href"];
    att.Value = FixLink(att);
 }
 doc.Save("file.htm");

Codeplex project home:
http://htmlagilitypack.codeplex.com/
Download: 1.4.0 Beta 2 Version:
http://htmlagilitypack.codeplex.com/releases/view/33903

Good coding ….
.