Got the user timeout counter all working nicely with minimal server queries, now to show the login dialog when timeout is close or finished.

This commit is contained in:
Shannon
2013-10-16 11:31:35 +11:00
parent 7c881a29ae
commit 7a3e9facd0
5 changed files with 84 additions and 20 deletions

View File

@@ -177,8 +177,21 @@ namespace Umbraco.Core
public static MethodInfo GetMethodInfo<T1, T2>(Expression<Func<T1, T2>> fromExpression)
{
if (fromExpression == null) return null;
var body = fromExpression.Body as MethodCallExpression;
return body != null ? body.Method : null;
MethodCallExpression me;
switch (fromExpression.Body.NodeType)
{
case ExpressionType.Convert:
case ExpressionType.ConvertChecked:
var ue = fromExpression.Body as UnaryExpression;
me = ((ue != null) ? ue.Operand : null) as MethodCallExpression;
break;
default:
me = fromExpression.Body as MethodCallExpression;
break;
}
return me != null ? me.Method : null;
}
/// <summary>