public byte[] GetBlob() { if (blob != null) return blob; if (!HasImage) throw new NotSupportedException (); return Module.Read (ref blob, this, (attribute, reader) => reader.ReadCustomAttributeBlob (attribute.signature)); }
private void WriteCustomAttribute(CustomAttribute custom) { custom.Resolve(); WriteDot(); WriteKeyword("custom"); WriteSpace(); WriteMethodReference(custom.Constructor, true); WriteSpace(); Write("="); WriteLine(); if (custom.HasConstructorArguments || custom.HasProperties || custom.HasFields) { WriteOpenBreckets(); WriteLine(); Indent(); if (custom.HasConstructorArguments) { WriteCustomAttributeConstructorArguments(custom.ConstructorArguments); } if (custom.HasProperties) { WriteCustomAttributeProperties(custom); } if (custom.HasFields) { WriteCustomAttributeFields(custom); } Outdent(); WriteEndBreckets(); } else { Byte[] blob = custom.GetBlob(); Write("("); WriteLine(); Indent(); WriteByteArray(blob); WriteLine(); Outdent(); Write(")"); WriteLine(); } }