Beispiel #1
0
 /// <summary>
 /// Writes custom attribute named arguments
 /// </summary>
 /// <param name="helper">Helper class</param>
 /// <param name="namedArgs">Named arguments</param>
 /// <returns>The named args blob</returns>
 internal static byte[] Write(ICustomAttributeWriterHelper helper, IList <CANamedArgument> namedArgs)
 {
     using (var writer = new CustomAttributeWriter(helper))
     {
         writer.Write(namedArgs);
         return(writer.GetResult());
     }
 }
Beispiel #2
0
 /// <summary>
 /// Writes a custom attribute
 /// </summary>
 /// <param name="helper">Helper class</param>
 /// <param name="ca">The custom attribute</param>
 /// <returns>Custom attribute blob</returns>
 public static byte[] Write(ICustomAttributeWriterHelper helper, CustomAttribute ca)
 {
     using (var writer = new CustomAttributeWriter(helper))
     {
         writer.Write(ca);
         return(writer.GetResult());
     }
 }