本文整理汇总了VB.NET中System.EnterpriseServices.PrivateComponentAttribute类的典型用法代码示例。如果您正苦于以下问题:VB.NET PrivateComponentAttribute类的具体用法?VB.NET PrivateComponentAttribute怎么用?VB.NET PrivateComponentAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PrivateComponentAttribute类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: PrivateComponentAttribute_Example
' 导入命名空间
Imports System.EnterpriseServices
Imports System.Reflection
' References:
' System.EnterpriseServices
' Note: Access checks must be performed at the component level to allow access
' to private components.
<assembly: ApplicationAccessControl(False, AccessChecksLevel := AccessChecksLevelOption.ApplicationComponent)>
<PrivateComponent()> _
Public Class PrivateComponentAttribute_Example
Inherits ServicedComponent
Public Sub Example()
' Display some output.
MsgBox("Private component called successfully.")
End Sub
End Class
Public Class PrivateComponentAttribute_Test
Inherits ServicedComponent
Public Sub Test()
' Create a new instance of the example class.
Dim example As New PrivateComponentAttribute_Example()
' Call a method on the class.
example.Example()
End Sub
End Class