public MarcidiaComponentEventArgs(MarcidiaComponent component)
        {
            if (component == null)
                throw new ArgumentNullException("component", "component is null.");

            Component = component;
        }
Exemplo n.º 2
0
        public static ComponentInfo GetInformationFor(MarcidiaComponent component)
        {
            Type type = component.GetType();

            object[] attribs = type.GetCustomAttributes(typeof(MarcidiaComponentAttribute), false);

            MarcidiaComponentAttribute attrib = attribs.Cast<MarcidiaComponentAttribute>().FirstOrDefault();

            if (attrib == null)
                return null;

            return new ComponentInfo(type, attrib.Name, attrib.Description, attrib.Author, attrib.Version, attrib.Website);
        }