/// <summary>
 ///     Creates a field marshal blob from <paramref name="marshalType" />
 /// </summary>
 /// <param name="module">Owner module</param>
 /// <param name="marshalType">Marshal type</param>
 /// <param name="helper">Helps this class</param>
 /// <returns>
 ///     A field marshal blob or <c>null</c> if <paramref name="marshalType" /> is
 ///     <c>null</c>
 /// </returns>
 public static byte[] Write(ModuleDef module, MarshalType marshalType, IWriterError helper)
 {
     using (var writer = new MarshalBlobWriter(module, helper))
     {
         return(writer.Write(marshalType));
     }
 }
Пример #2
0
		/// <summary>
		/// Creates a field marshal blob from <paramref name="marshalType"/>
		/// </summary>
		/// <param name="module">Owner module</param>
		/// <param name="marshalType">Marshal type</param>
		/// <param name="helper">Helps this class</param>
		/// <returns>A field marshal blob or <c>null</c> if <paramref name="marshalType"/> is
		/// <c>null</c></returns>
		public static byte[] Write(ModuleDef module, MarshalType marshalType, IWriterError helper) {
			using (var writer = new MarshalBlobWriter(module, helper))
				return writer.Write(marshalType);
		}
Пример #3
0
 /// <summary>
 /// Creates a field marshal blob from <paramref name="marshalType"/>
 /// </summary>
 /// <param name="module">Owner module</param>
 /// <param name="marshalType">Marshal type</param>
 /// <param name="helper">Helps this class</param>
 /// <param name="optimizeCustomAttributeSerializedTypeNames">Optimize serialized type strings in custom attributes.
 /// For more info, see <see cref="MetadataFlags.OptimizeCustomAttributeSerializedTypeNames"/></param>
 /// <returns>A field marshal blob or <c>null</c> if <paramref name="marshalType"/> is
 /// <c>null</c></returns>
 public static byte[] Write(ModuleDef module, MarshalType marshalType, IWriterError helper, bool optimizeCustomAttributeSerializedTypeNames)
 {
     using var writer = new MarshalBlobWriter(module, helper, optimizeCustomAttributeSerializedTypeNames);
     return(writer.Write(marshalType));
 }