Exemple #1
0
        private void resolveFigureDisplayAttributes(FieldBuilder fb, MemberInfo mi, MemberRubric mr)
        {
            object[] o = mi.GetCustomAttributes(typeof(FigureDisplayAttribute), false);
            if (o != null && o.Any())
            {
                FigureDisplayAttribute fda = (FigureDisplayAttribute)o.First();;
                mr.DisplayName = fda.Name;

                if (fb != null)
                {
                    CreateFigureDisplayAttribute(fb, fda);
                }
            }
            else if (mr.DisplayName != null)
            {
                CreateFigureDisplayAttribute(fb, new FigureDisplayAttribute(mr.DisplayName));
            }
        }
Exemple #2
0
 public void CreateFigureDisplayAttribute(FieldBuilder field, FigureDisplayAttribute attrib)
 {
     field.SetCustomAttribute(new CustomAttributeBuilder(figureDisplayCtor, new object[] { attrib.Name }));
 }