public AddOnInfo GetAddOns() { var addOnInfo = new AddOnInfo(); var addOns = TypeFinder.FindClassesOfType <ISyncAddOn>(); foreach (var addOn in addOns) { var instance = Activator.CreateInstance(addOn) as ISyncAddOn; if (instance != null) { addOnInfo.AddOns.Add(instance); } } addOnInfo.Version = typeof(uSync8.BackOffice.uSync8BackOffice).Assembly.GetName().Version.ToString() + uSyncBackOfficeConstants.ReleaseSuffix; addOnInfo.AddOns = addOnInfo.AddOns.OrderBy(x => x.SortOrder).ToList(); addOnInfo.AddOnString = string.Join(", ", addOnInfo.AddOns .Where(x => !string.IsNullOrWhiteSpace(x.Name) && x.Name[0] != '_') .Select(x => $"{x.Name} (v{x.Version})")); return(addOnInfo); }
public AddOnInfo GetAddOns() { var addOnInfo = new AddOnInfo(); var addOns = TypeFinder.FindClassesOfType <ISyncAddOn>(); foreach (var addOn in addOns) { var instance = Activator.CreateInstance(addOn) as ISyncAddOn; if (instance != null) { addOnInfo.AddOns.Add(instance); } } addOnInfo.AddOns = addOnInfo.AddOns.OrderBy(x => x.SortOrder).ToList(); addOnInfo.AddOnString = string.Join(", ", addOnInfo.AddOns.Select(x => x.Name)); return(addOnInfo); }