本文整理匯總了VB.NET中System.Runtime.Remoting.Messaging.IMethodMessage.LogicalCallContext屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET IMethodMessage.LogicalCallContext屬性的具體用法?VB.NET IMethodMessage.LogicalCallContext怎麽用?VB.NET IMethodMessage.LogicalCallContext使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Runtime.Remoting.Messaging.IMethodMessage
的用法示例。
在下文中一共展示了IMethodMessage.LogicalCallContext屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: MyProxy
Public Class MyProxy
Inherits RealProxy
Private stringUri As String
Private targetObject As MarshalByRefObject
<SecurityPermission(SecurityAction.LinkDemand)> _
Public Sub New(type As Type)
MyBase.New(type)
targetObject = CType(Activator.CreateInstance(type), MarshalByRefObject)
Dim myObject As ObjRef = RemotingServices.Marshal(targetObject)
stringUri = myObject.URI
End Sub
<SecurityPermission(SecurityAction.LinkDemand)> _
Public Sub New(type As Type, targetObject As MarshalByRefObject)
MyBase.New(type)
Me.targetObject = targetObject
End Sub
<SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags:=SecurityPermissionFlag.Infrastructure)> _
Public Overrides Function Invoke(message As IMessage) As IMessage
message.Properties("__Uri") = stringUri
Dim myMethodMessage As IMethodMessage = _
CType(ChannelServices.SyncDispatchMessage(message), IMethodMessage)
Console.WriteLine("---------IMethodMessage example-------")
Console.WriteLine("Method name : " + myMethodMessage.MethodName)
Console.WriteLine("LogicalCallContext has information : " + _
myMethodMessage.LogicalCallContext.HasInfo.ToString())
Console.WriteLine("Uri : " + myMethodMessage.Uri)
Return myMethodMessage
End Function 'Invoke
End Class
開發者ID:VB.NET開發者,項目名稱:System.Runtime.Remoting.Messaging,代碼行數:35,代碼來源:IMethodMessage.LogicalCallContext