当前位置: 首页>>代码示例>>C#>>正文


C# MarshalByRefObject.GetType方法代码示例

本文整理汇总了C#中System.MarshalByRefObject.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# MarshalByRefObject.GetType方法的具体用法?C# MarshalByRefObject.GetType怎么用?C# MarshalByRefObject.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.MarshalByRefObject的用法示例。


在下文中一共展示了MarshalByRefObject.GetType方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetObjectSink

        public IMessageSink GetObjectSink(MarshalByRefObject obj, IMessageSink nextSink)
        {
            if (obj.GetType().GetCustomAttributes(typeof(ONContextAttribute), true).Length > 0)
                nextSink = new ONContextInterceptor(obj, nextSink, mOnContextClass);

            return nextSink;
        }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:7,代码来源:ONContextAdder.cs

示例2: MockingProxy

		public MockingProxy(MarshalByRefObject wrappedInstance, IInterceptor interceptor, IMockMixin mockMixin)
			: base(wrappedInstance.GetType())
		{
			this.WrappedInstance = wrappedInstance;
			this.interceptor = interceptor;
			this.mockMixin = mockMixin;
		}
开发者ID:somkidodd,项目名称:JustMockLite,代码行数:7,代码来源:MockingProxy.cs

示例3: Unregister

		public void Unregister(MarshalByRefObject obj) {
			ILease lease = (ILease)RemotingServices.GetLifetimeService(obj);
			Debug.Assert(lease.CurrentState == LeaseState.Active);
			lease.Unregister(this);
			lock(this._lock) {
				this._leaseList.Remove(lease);
				Logger.Debug(this, "Stopped sponsoring lease #" + lease.GetHashCode() + " for proxy to " + obj.GetType().Name + ", id = #" + obj.GetHashCode() + ", url = " + RemotingServices.GetObjectUri(obj));
			}
		}
开发者ID:StevenArnauts,项目名称:appserver,代码行数:9,代码来源:SponsorshipManager.cs

示例4: PostProcess

        public void PostProcess(IMethodCallMessage callMsg, ref IMethodReturnMessage retMsg, MarshalByRefObject target)
        {
            Type type = target.GetType();
            MethodInfo mi = type.GetMethod("UpdateSetting");
            if (mi == null) return;
            Settings = (Dictionary<string, string>)callMsg.Properties["_settings"];
            if (Settings != null)
            {
                foreach (KeyValuePair<string, string> setting in Settings)
                {
                    mi.Invoke(target, new object[] { setting.Key, setting.Value });
                }

            }
        }
开发者ID:WrongDog,项目名称:Aspect,代码行数:15,代码来源:NotificationProcessor.cs

示例5: ServerIdentity

 internal ServerIdentity(MarshalByRefObject obj, Context serverCtx) : base(obj is ContextBoundObject)
 {
     if (obj != null)
     {
         if (!RemotingServices.IsTransparentProxy(obj))
         {
             this._srvType = obj.GetType();
         }
         else
         {
             this._srvType = RemotingServices.GetRealProxy(obj).GetProxiedType();
         }
     }
     this._srvCtx = serverCtx;
     this._serverObjectChain = null;
     this._stackBuilderSink = null;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:17,代码来源:ServerIdentity.cs

示例6: ServerIdentity

 //   Creates a new server identity. This form is used by RemotingServices.Wrap
 //
 internal ServerIdentity(MarshalByRefObject obj, Context serverCtx) : base(obj is ContextBoundObject)
 {            
     if(null != obj)
     {
         if(!RemotingServices.IsTransparentProxy(obj))
         {
             _srvType = obj.GetType();
         }
         else
         {
             RealProxy rp = RemotingServices.GetRealProxy(obj);
             _srvType =   rp.GetProxiedType();
         }
     }
     
     _srvCtx = serverCtx;
     _serverObjectChain = null; 
     _stackBuilderSink = null;
     _refCount = 0;
 }
开发者ID:ArildF,项目名称:masters,代码行数:22,代码来源:serveridentity.cs

示例7: MyProxy

 public MyProxy(MarshalByRefObject target)
     : base(target.GetType())
 {
     this.target = target;
 }
开发者ID:robertmichaelwalsh,项目名称:Multilex,代码行数:5,代码来源:remoting4.cs

示例8: PrevalentSystemProxy

		public PrevalentSystemProxy(PrevalenceEngine engine, MarshalByRefObject system) : base(system.GetType())
		{
			_engine = engine;
			_system = system;
		}
开发者ID:bamboo,项目名称:Bamboo.Prevalence,代码行数:5,代码来源:PrevalentSystemProxy.cs

示例9: MarshallableProxy

 public MarshallableProxy(MarshalByRefObject targetObject, InvocationDelegate invoker)
     : this(targetObject.GetType(), targetObject, invoker)
 {
 }
开发者ID:juanplopes,项目名称:simple-commons,代码行数:4,代码来源:MarshallableProxy.cs

示例10: PrepareLocationFwdStream

        private Stream PrepareLocationFwdStream(string host, ushort port,
                                                MarshalByRefObject target) {
            // loc fwd ior
            byte[] objectKey = IorUtil.GetObjectKeyForObj(target);
            string repositoryID = Repository.GetRepositoryID(target.GetType());
            // this server support GIOP 1.2 --> create an GIOP 1.2 profile
            InternetIiopProfile profile = new InternetIiopProfile(new GiopVersion(1, 2), host,
                                                                  port, objectKey);
            profile.AddTaggedComponent(Services.CodeSetService.CreateDefaultCodesetComponent(m_codec));
            Ior locFwdTarget = new Ior(repositoryID, new IorProfile[] { profile });
            CdrOutputStreamImpl iorStream = new CdrOutputStreamImpl(new MemoryStream(),
                                                                    0, new GiopVersion(1, 2));
            locFwdTarget.WriteToStream(iorStream);
            uint encodedIorLength = (uint)iorStream.GetPosition();
 
            // create the location fwd reply
            MemoryStream sourceStream = new MemoryStream();
            CdrOutputStreamImpl cdrOut = new CdrOutputStreamImpl(sourceStream, 0, new GiopVersion(1, 2));
            cdrOut.WriteOpaque(m_giopMagic);
            // version
            cdrOut.WriteOctet(1);
            cdrOut.WriteOctet(2);
            // flags
            cdrOut.WriteOctet(0);
            // msg-type: reply
            cdrOut.WriteOctet(1);
 
            // msg-length
            cdrOut.WriteULong(28 + encodedIorLength);
            // request-id
            cdrOut.WriteULong(5);
            // reply-status: location fwd
            cdrOut.WriteULong(3);
            // one service context to enforce alignement requirement for giop 1.2
            cdrOut.WriteULong(1);
            cdrOut.WriteULong(162739); // service context id
            cdrOut.WriteULong(2); // length of svc context
            cdrOut.WriteBool(true);
            cdrOut.WriteBool(false);
            // svc context end
            // body: 8 aligned
            cdrOut.ForceWriteAlign(Aligns.Align8);

            locFwdTarget.WriteToStream(cdrOut);
 
            sourceStream.Seek(0, SeekOrigin.Begin);
            return sourceStream;
        }
开发者ID:JnS-Software-LLC,项目名称:iiop-net,代码行数:48,代码来源:GiopMessageHandler.cs

示例11: CreateIorForObjectFromThisDomain

 /// <summary>
 /// creates an IOR for an object hosted in the local appdomain.
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 internal static Ior CreateIorForObjectFromThisDomain(MarshalByRefObject obj) {
     return CreateIorForObjectFromThisDomain(obj, obj.GetType(), false);
 }
开发者ID:JnS-Software-LLC,项目名称:iiop-net,代码行数:8,代码来源:IORUtil.cs

示例12: Write174_MarshalByRefObject

 private void Write174_MarshalByRefObject(string n, string ns, MarshalByRefObject o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else if (!needType)
     {
         System.Type type = o.GetType();
         if (type != typeof(MarshalByRefObject))
         {
             if (type != typeof(Controller))
             {
                 throw base.CreateUnknownTypeException(o);
             }
             this.Write175_Controller(n, ns, (Controller) o, isNullable, true);
         }
     }
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:22,代码来源:XmlSerializationWriter1.cs


注:本文中的System.MarshalByRefObject.GetType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。