AllowPartiallyTrustedCallersAttribute.PartialTrustVisibilityLevel Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the default partial trust visibility for code that is marked with the AllowPartiallyTrustedCallersAttribute (APTCA) attribute.
public:
property System::Security::PartialTrustVisibilityLevel PartialTrustVisibilityLevel { System::Security::PartialTrustVisibilityLevel get(); void set(System::Security::PartialTrustVisibilityLevel value); };
public System.Security.PartialTrustVisibilityLevel PartialTrustVisibilityLevel { get; set; }
member this.PartialTrustVisibilityLevel : System.Security.PartialTrustVisibilityLevel with get, set
Public Property PartialTrustVisibilityLevel As PartialTrustVisibilityLevel
Property Value
One of the enumeration values. The default is VisibleToAllHosts.
Remarks
The following examples demonstrate how to use this property.
Default, unconditional APTCA:
[assembly: AllowPartiallyTrustedCallers]
Defaults to VisibleToAllHosts.
Explicit, unconditional APTCA:
[assembly: AllowPartiallyTrustedCallers(PartialTrustVisibilityLevel=VisibleToAllHosts)]
The assembly can always be called by partial-trust code.
Explicit, conditional APTCA:
[assembly: AllowPartiallyTrustedCallers(PartialTrustVisibilityLevel=NotVisibleByDefault)]
The assembly has been audited for partial trust, but it is not visible to partial-trust code by default. To make the assembly visible to partial-trust code, add it to the AppDomainSetup.PartialTrustVisibleAssemblies property.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기