* Replace AttributeConstructor null assertion with runtime exception
* Remove redundand Json.NET package references
* Revert "Remove redundand Json.NET package references"
This reverts commit
5247c1f98313410fc8cff399670f9595155cef9c.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
+using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using Microsoft.CodeAnalysis;
public ConstructorInfoWrapper(IMethodSymbol ctor, MetadataLoadContextInternal metadataLoadContext)
{
+ Debug.Assert(ctor != null);
_ctor = ctor;
_metadataLoadContext = metadataLoadContext;
}
{
public CustomAttributeDataWrapper(AttributeData a, MetadataLoadContextInternal metadataLoadContext)
{
- Debug.Assert(a.AttributeConstructor != null);
+ if (a.AttributeConstructor is null)
+ {
+ throw new InvalidOperationException();
+ }
var namedArguments = new List<CustomAttributeNamedArgument>();
foreach (KeyValuePair<string, TypedConstant> na in a.NamedArguments)