public UIPlaylistColumnProvider(UIPlaylistColumnProviderAttribute attribute, Type type) { this.Id = attribute.Id; this.Name = attribute.Name; this.Description = attribute.Description; this.Type = type; }
public IEnumerable <UIPlaylistColumnProvider> GetProviders() { var components = new List <UIPlaylistColumnProvider>(); foreach (var type in ComponentScanner.Instance.GetComponents(typeof(IUIPlaylistColumnProvider))) { var attribute = default(UIPlaylistColumnProviderAttribute); if (!type.HasCustomAttribute <UIPlaylistColumnProviderAttribute>(false, out attribute)) { attribute = new UIPlaylistColumnProviderAttribute(type.AssemblyQualifiedName, type.Name); } components.Add(new UIPlaylistColumnProvider(attribute, type)); } return(components); }