Sign in
|
Join
|
Help
Home
Merchandise
Blogs
Media
Groups
RSS
Twitter
Jimmy Bogard
»
All Tags
»
C#
(
RSS
)
Browse by Tags
Jimmy Bogard
Home
Contact
The Lounge
Ads by The Lounge
Friends of Pablo
Friends of Pablo
Syndication
RSS for Posts
Atom
RSS for Comments
Recent Posts
Expressions Cheat Sheet
More on Late-Bound Invocations with Expression Trees
Strongly-typed Telerik reports
Adventures with IL Merge
Unicode in regular expressions
Tags
Agile
ASP.NET
ASP.NET MVC
AutoMapper
BDD
Behave#
Behavior-Driven Development
C#
Continuous Integration
Design
Domain-Driven Design
Legacy Code
LINQ
LINQ to SQL
Misc
Patterns
Rant
Refactoring
StructureMap
TDD
Team Build
Testing
Tools
VSTS
WCF
View more
News
Archives
July 2009 (2)
June 2009 (10)
May 2009 (11)
April 2009 (10)
March 2009 (9)
February 2009 (12)
January 2009 (10)
December 2008 (8)
November 2008 (14)
October 2008 (11)
September 2008 (10)
August 2008 (11)
July 2008 (12)
June 2008 (11)
May 2008 (15)
April 2008 (10)
March 2008 (15)
February 2008 (13)
January 2008 (19)
December 2007 (9)
November 2007 (17)
October 2007 (23)
September 2007 (10)
August 2007 (11)
July 2007 (11)
June 2007 (9)
May 2007 (14)
April 2007 (7)
ASP.NET
ASP.NET MVC
AutoMapper
BDD
Code smells
Domain Driven Design
Domain-Driven Design
Legacy Code
LINQ
MVC
Patterns
People
Refactoring
Testing
Expressions Cheat Sheet
I started getting really tired of looking up the translation between the ExpressionType and concrete Expression type (they don’t match up), so I created this cheat sheet that has each ExpressionType, derived Expression type and a simple example. ...
Published
Wed, Jun 06 2009 10:36 PM
by
bogardj
Filed under:
C#
More on Late-Bound Invocations with Expression Trees
Recently, I went on a bit of a tear in the AutoMapper trying to improve performance. Besides the threading issues I introduced (dictionary lookups are NOT thread safe, in case you’re wondering), I looked at improving the performance of the reflection...
Published
Wed, Jun 06 2009 9:04 PM
by
bogardj
Filed under:
C#
Strongly-typed Telerik reports
I absolutely loathe magic strings, especially if all they’re used for is pointing to a member on a type. Using strings to reference a type member is ridiculously brittle, as any change in the source type member, rename or remove, will not cause...
Published
Sat, Apr 04 2009 2:43 PM
by
bogardj
Filed under:
C#
Adventures with IL Merge
A recent addition to AutoMapper is the feature where I can map directly to and from interfaces. You don’t need a concrete type to do this, AutoMapper will create an implementation for you at runtime, with default property behavior. To do so...
Published
Sat, Apr 04 2009 5:47 PM
by
bogardj
Filed under:
C#
,
AutoMapper
Unicode in regular expressions
Wow, what an interesting blog post title! Two technologies, each scintillating by itself, when brought together have more energy than a 1988 GnR concert. A feature request came up in AutoMapper to support international characters. On the surface...
Published
Mon, Mar 03 2009 9:03 PM
by
bogardj
Filed under:
C#
Polymorphism in Expression trees
While trying to be extra-clever today, I found a potential nasty issue when dealing with strongly-typed reflection . Suppose I have a simple hierarchy of objects: public abstract class Base { public abstract string Foo { get ; } } public class Child...
Published
Tue, Feb 02 2009 8:11 PM
by
bogardj
Filed under:
C#
Spaces in identifier names in C#
While I’m a fan of descriptive member names for testcase classes and test methods, there wasn’t a great way to create readable text. Text in code editors is almost universally monospace, which reads very well for languages with lots of syntax. ...
Published
Mon, Feb 02 2009 10:49 PM
by
bogardj
Filed under:
C#
,
BDD
Extension methods and a plea for mixins
I was having a spot of trouble the other day trying to get my extension methods to show up in my ASP.NET MVC Views. One of the issues we’ve run into is trying to make our Views (more) intelligent on the HTML they create. Our Views still only...
Published
Fri, Jan 01 2009 9:35 PM
by
bogardj
Filed under:
C#
,
ASP.NET MVC
Piecemeal Expression evaluation
One of the more interesting uses of Expressions is strongly-typed reflection . It seems that most of the time dealing with expressions, I never care about ever actually evaluating the expression for any reason. When all I’m doing is parsing...
Published
Sun, Dec 12 2008 5:33 PM
by
bogardj
Filed under:
C#
Why we need named parameters
C# 4.0 brings the idea of named parameters to C#. While optional/default arguments are of questionable value (this is from my VB.NET days), named parameters can really clear up the meaning of a method call. We’re already faking named parameters...
Published
Thu, Dec 12 2008 9:10 AM
by
bogardj
Filed under:
C#
Making frameworks container-aware
I’m currently knee-deep in NHibernate custom listeners, for the purpose of adding auditing to our application. Besides current documentation being plain wrong on the subject (I’ll update on the solution in the future), I hit a rather frustrating...
Published
Sun, Dec 12 2008 9:12 PM
by
bogardj
Filed under:
C#
More C# Attribute annoyances
And on the subject of the deficiencies of attributes, there are a few more things I’d like to accomplish, but cant. First on the list, generic attributes: // Boo C# compiler, boo!!! public class GenericAttribute <T> : Attribute So many times...
Published
Thu, Dec 12 2008 9:09 PM
by
bogardj
Filed under:
C#
Dealing with parameters in expressions and strongly-typed reflection
Something that always bothered me using Expression trees for strongly-typed reflection were the weirdness of doing reflection for methods that return parameters. Expression trees and reflection go hand-in-hand when doing fluent interfaces/internal...
Published
Mon, Nov 11 2008 10:22 PM
by
bogardj
Filed under:
C#
Beware exceptions in attribute constructors
If you’d like to have some really wacky bugs, be sure to do something like this: public class BlowupAttribute : Attribute { public BlowupAttribute( int time) { if (time <= 0) throw new ArgumentOutOfRangeException ( "time" , time, "Must...
Published
Sat, Nov 11 2008 8:05 PM
by
bogardj
Filed under:
C#
Functionally dynamic?
I was just playing with this tonight, but I don’t know it’s worth anything. I thought of it after some conversations with Matt Podwysocki back at KaizenConf on how do apply some functional ideas in C#. First, I started with a simple class...
Published
Wed, Nov 11 2008 9:41 PM
by
bogardj
Filed under:
C#
1
2
3
4
Next >
Copyright Los Techies 2008, 2009. All rights reserved.