<PackageReference Include="System.Security.Permissions" Version="9.0.6" />

GacMembershipCondition

Determines whether an assembly belongs to a code group by testing its global assembly cache membership. This class cannot be inherited.

Initializes a new instance of the GacMembershipCondition class.

public bool Check(Evidence evidence)

Indicates whether the specified evidence satisfies the membership condition.

Creates an equivalent copy of the membership condition.

public void FromXml(SecurityElement e)

Uses the specified XML encoding to reconstruct a security object.

public void FromXml(SecurityElement e, PolicyLevel level)

Uses the specified XML encoding to reconstruct a security object, using the specified policy level context.

Creates an XML encoding of the security object and its current state.

Creates an XML encoding of the security object and its current state, using the specified policy level context.