Exemple #1
0
 public Images(WinFormsIconProvider winFormsIconProvider, WpfIconProvider wpfIconProvider, IconIconProvider iconIconProvider)
 {
     this.winFormsIconProvider = winFormsIconProvider;
     this.wpfIconProvider      = wpfIconProvider;
     this.iconIconProvider     = iconIconProvider;
 }
 public static T TryGet <T>(this WinFormsIconProvider images, Expression <Func <WinFormsIconProvider, T> > expression)
 => expression.Body is MemberExpression member && member.Member is PropertyInfo info && images != null ? (T)info.GetValue(images) : default;