Permalink
Browse files

updated StructureMap, few ReflectionHelper

  • Loading branch information...
1 parent 7c8e9b9 commit e4acde5d81aa5e79f411bbba13f742e45c761009 @jeremydmiller jeremydmiller committed Mar 10, 2010
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -113,7 +113,7 @@ public static bool IsMemberExpression<T>(Expression<Func<T, object>> expression)
return GetMemberExpression(expression, false) != null;
}
- public static Accessor GetAccessor<MODEL>(Expression<Func<MODEL, object>> expression)
+ public static Accessor GetAccessor<TModel>(Expression<Func<TModel, object>> expression)
{
MemberExpression memberExpression = getMemberExpression(expression);
@@ -139,7 +139,7 @@ public static Accessor GetAccessor(MemberExpression memberExpression)
return new PropertyChain(list.ToArray());
}
- public static Accessor GetAccessor<MODEL, T>(Expression<Func<MODEL, T>> expression)
+ public static Accessor GetAccessor<TModel, T>(Expression<Func<TModel, T>> expression)
{
MemberExpression memberExpression = getMemberExpression(expression);
@@ -161,7 +161,7 @@ public static MethodInfo GetMethod(Expression expression)
return new FindMethodVisitor(expression).Method;
}
- public static MethodInfo GetMethod<DELEGATE>(Expression<DELEGATE> expression)
+ public static MethodInfo GetMethod<TDelegate>(Expression<TDelegate> expression)
{
return new FindMethodVisitor(expression).Method;
}
@@ -69,13 +69,12 @@ public void AttemptToAttachViewToAction(ViewBag bag, ActionCall call, IConfigura
}
// if the filter returned more than one, consider it "failed", ignore it, and move on to the next
- if (count == 1)
- {
- var token = viewTokens.First();
- observer.RecordCallStatus(call, "Selected view token: {0}".ToFormat(token));
- call.AddToEnd(token.ToBehavioralNode());
- break;
- }
+ if (count != 1) continue;
+
+ var token = viewTokens.First();
+ observer.RecordCallStatus(call, "Selected view token: {0}".ToFormat(token));
+ call.AddToEnd(token.ToBehavioralNode());
+ break;
}
}
}

0 comments on commit e4acde5

Please sign in to comment.