Example #1
0
 public static void OutputAttributes(CustomAttributeCollection attributes, PageBrush brush)
 {
     foreach (var item in attributes)
     {
         var attr = item as CustomAttribute;
         OutputAttribute(attr, brush);
     }
 }
 public override void OnInit()
 {
     //为了节省内存,固化attributes,这样其余线程访问时,会加载该对象作为本地值,而不是重新new新的对象
     if (this.Attributes == null)
     {
         this.Attributes = new CustomAttributeCollection();
     }
 }
Example #3
0
 public static void OutputAttributes(CustomAttributeCollection attributes, StringBuilder code)
 {
     foreach (var item in attributes)
     {
         var attr = item as CustomAttribute;
         OutputAttribute(attr, code);
     }
 }