Inheritance: System.Attribute
Exemplo n.º 1
0
 public void AddBabelName(MethodBuilder methodBuilder,
                          string babelName)
 {
     Type[] paramTypes = new Type[] { typeof(string) };
     ConstructorInfo constructor =
         typeof(BabelNameAttribute).GetConstructor(paramTypes);
     CustomAttributeBuilder attrBuilder =
         new CustomAttributeBuilder(constructor,
                                    new object[] { babelName });
     methodBuilder.SetCustomAttribute(attrBuilder);
     Attribute attr = new BabelNameAttribute(babelName);
     AddCustomAttribute(methodBuilder, attr);
 }