Allow change FontStyle, FontWeight, FontStretch

This commit is contained in:
Yeechan Lu
2014-03-25 13:25:43 +08:00
parent 60d64ad2a6
commit b10caecbba
7 changed files with 201 additions and 8 deletions

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Wox.Helper
{
public static class SyntaxSugars
{
public static TResult CallOrRescueDefault<TResult>(Func<TResult> callback)
{
return CallOrRescueDefault(callback, default(TResult));
}
public static TResult CallOrRescueDefault<TResult>(Func<TResult> callback, TResult def)
{
try
{
return callback();
}
catch
{
return def;
}
}
}
}