protected void Load() { var image = _module.Image; CustomAttributeRow row; image.GetCustomAttribute(_rid, out row); _constructor = MethodReference.LoadMethodDefOrRef(_module, MetadataToken.DecompressCustomAttributeType(row.Type)); try { using (var accessor = image.OpenBlob(row.Value)) { Load(accessor); } } catch (Exception) { // Blob is not self descriptive. In case of enum we need to resolve reference to // enum type in order to get enum underlying type (int16, int32, ...). If enum type // could not be resolved exception is thrown. _failedToLoad = true; } }