Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/NRefactory.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedSecurityDeclarationBlob.cs')
-rw-r--r--ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedSecurityDeclarationBlob.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedSecurityDeclarationBlob.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedSecurityDeclarationBlob.cs
index 0b4bc2cb..923d7ba7 100644
--- a/ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedSecurityDeclarationBlob.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedSecurityDeclarationBlob.cs
@@ -27,8 +27,9 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public sealed class UnresolvedSecurityDeclarationBlob
{
static readonly ITypeReference securityActionTypeReference = typeof(System.Security.Permissions.SecurityAction).ToTypeReference();
+#if !NET6_0
static readonly ITypeReference permissionSetAttributeTypeReference = typeof(System.Security.Permissions.PermissionSetAttribute).ToTypeReference();
-
+#endif
readonly IConstantValue securityAction;
readonly byte[] blob;
readonly IList<IUnresolvedAttribute> unresolvedAttributes = new List<IUnresolvedAttribute>();
@@ -45,6 +46,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
unresolvedAttributes.Add(new UnresolvedSecurityAttribute(this, (int)i));
}
} else {
+#if !NET6_0
// for backward compatibility with .NET 1.0: XML-encoded attribute
var attr = new DefaultUnresolvedAttribute(permissionSetAttributeTypeReference);
attr.ConstructorParameterTypes.Add(securityActionTypeReference);
@@ -52,6 +54,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
string xml = System.Text.Encoding.Unicode.GetString(blob);
attr.AddNamedPropertyArgument("XML", new SimpleConstantValue(KnownTypeReference.String, xml));
unresolvedAttributes.Add(attr);
+#endif
}
}