teebot

Stories submitted by teebot

Loop through Enumerations in C#(www.teebot.be)

submitted by teebotteebot(65) 1 year, 8 months ago

I recently found out it's pretty easy to iterate through enums by first getting the names of the enums and then parsing those back as enum. read more...

1 comment |category: |Views: 3

tags: another

ASP.NET MVC : Mocking the Repository with Ninject.Moq(www.teebot.be)

submitted by teebotteebot(65) 2 years, 2 months ago

If you are already familiar with ASP.NET MVC, you have probably seen the repository pattern in a few examples (such as NerdDinner), maybe you even use it in your own app. One of the most frequent way to hot-plug a Repository class into a controller is to use the Strategy Pattern. But while an application evolves, you might want to centrally manage your wiring within a provider, that's what Dependency Injectors are for. However lots of Dependency Injectors - or IoC containers at large - such as Unity or Castle Windsor contain a plethora of features and often rely heavily on XML configuration, making them overkill for smaller projects. In this short post we will see how to: -Quickly inject a Repository in a controller with Ninject -Mock the IRepository interface in your tests with Ninject.Moq plugin read more...

add a comment |category: |Views: 430

tags: another

Visual Studio Tip: Fear the Regex Magic No More(www.teebot.be)

submitted by teebotteebot(65) 2 years, 3 months ago

Here's a quick tip from the trenches. I'm sure lots of developers had to - one day or another - weigh between replacing some text by hand or finding a regular expression to automate the process. read more...

add a comment |category: |Views: 56

tags: another

Setting AD Properties using the new AccountManagement API (teebot.be)

submitted by teebotteebot(65) 2 years, 5 months ago

So I'm currently programming a lightweight utility to manage LDAP objects and I came to use the new AccountManagement API introduced in .NET 3.5 because it's way easier and more object-oriented than DirectoryServices. This new namespace, as I see it, is just provided as a friendlier way to query an LDAP server and is actually built on top of the plain DirectoryServices bits. And it shows... For example you have to dispose all objects performing a search (FindIdentity) read more...

add a comment |category: |Views: 2

tags: another

Retrieve a Type of Parent Control Using an Extension Method(teebot.be)

submitted by teebotteebot(65) 2 years, 9 months ago

I recently found myself in a situation where I had to retrieve the next Parent Control of a certain type. In this particular case, my label is included in an UpdatePanel to update only when my Label is assigned a new value. read more...

add a comment |category: |Views: 6

tags: another

ASP.NET: Attach an OnChanged Event to your own User Controls(teebot.be)

submitted by teebotteebot(65) 2 years, 9 months ago

How do you make a custom control post back to the server each time a user interacts with it? (a la OnSelectedChange in a DropDownList). Although this sounds trivial at first I haven't found lots of resources mentionning this. read more...

add a comment |category: |Views: 13

tags: another

Visual Studio Tip #1 : Your Own Keyboard Shortcuts(teebot.be)

submitted by teebotteebot(65) 2 years, 9 months ago

Among the best productivity tips we developers should follow first is this one: let's get our hands off that bloody mouse (we should make it a song and sing it along everyday but we would look silly at best). Of course, by default Visual Studio is full of keyboard shortcuts but adding your owns can be a huge benefit. Here's a few examples. read more...

add a comment |category: |Views: 16

tags: another