Browse Source

Fix #284 NotSupportedException thrown in NR CecilLoader

pull/516/head
Daniel Grunwald 11 years ago
parent
commit
ae692d51b7
  1. 8
      src/Libraries/NRefactory/ICSharpCode.NRefactory.Cecil/CecilLoader.cs

8
src/Libraries/NRefactory/ICSharpCode.NRefactory.Cecil/CecilLoader.cs

@ -824,7 +824,13 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -824,7 +824,13 @@ namespace ICSharpCode.NRefactory.TypeSystem
void AddSecurityAttributes(SecurityDeclaration secDecl, IList<IUnresolvedAttribute> targetCollection)
{
var blobSecDecl = new UnresolvedSecurityDeclarationBlob((int)secDecl.Action, secDecl.GetBlob());
byte[] blob;
try {
blob = secDecl.GetBlob();
} catch (NotSupportedException) {
return; // https://github.com/icsharpcode/SharpDevelop/issues/284
}
var blobSecDecl = new UnresolvedSecurityDeclarationBlob((int)secDecl.Action, blob);
targetCollection.AddRange(blobSecDecl.UnresolvedAttributes);
}
#endregion

Loading…
Cancel
Save