本文整理汇总了C#中System.Runtime.Remoting.IRemotingTypeInfo接口的典型用法代码示例。如果您正苦于以下问题:C# IRemotingTypeInfo接口的具体用法?C# IRemotingTypeInfo怎么用?C# IRemotingTypeInfo使用的例子?那么恭喜您, 这里精选的接口代码示例或许可以为您提供帮助。
IRemotingTypeInfo接口属于System.Runtime.Remoting命名空间,在下文中一共展示了IRemotingTypeInfo接口的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: foreach
ObjRef objRefSample = RemotingServices.GetObjRefForProxy(myRemoteObject);
Console.WriteLine("***ObjRef Details***");
Console.WriteLine("URI:\t{0}", objRefSample.URI);
object[] channelData = objRefSample.ChannelInfo.ChannelData;
Console.WriteLine("Channel Info:");
foreach(object o in channelData)
Console.WriteLine("\t{0}", o.ToString());
IEnvoyInfo envoyInfo = objRefSample.EnvoyInfo;
if (envoyInfo == null) {
Console.WriteLine("This ObjRef does not have envoy information.");
}
else {
IMessageSink envoySinks = envoyInfo.EnvoySinks;
Console.WriteLine("Envoy Sink Class: {0}", envoySinks);
}
IRemotingTypeInfo typeInfo = objRefSample.TypeInfo;
Console.WriteLine("Remote type name: {0}", typeInfo.TypeName);
Console.WriteLine("Can my object cast to a Bitmap? {0}",
typeInfo.CanCastTo(typeof(System.Drawing.Bitmap), objRefSample));
Console.WriteLine("Is this object from this AppDomain? {0}", objRefSample.IsFromThisAppDomain());
Console.WriteLine("Is this object from this process? {0}", objRefSample.IsFromThisProcess());