I have a WPF (NET 4.6) app running under Citrix where I dynamically load reports from the assemblies as long as the type has the DisplayName attribute defined. This works fine when run from my machine or from a network share. This does NOT work in Citrix.
var asm = System.Reflection.Assembly.GetExecutingAssembly();
var rep = asm.GetTypes().Where(x => (typeof(Telerik.Reporting.Report)).IsAssignableFrom(x) && x.IsDefined(typeof(System.ComponentModel.DisplayNameAttribute), true)).ToList();
Reports = (rep.ToDictionary((x => (x.GetCustomAttributes(typeof(System.ComponentModel.DisplayNameAttribute), true).Single()
as System.ComponentModel.DisplayNameAttribute).DisplayName), (x => x)));
Aucun commentaire:
Enregistrer un commentaire