/// <include file='doc\ServicedComponent.uex' path='docs/doc[@for="ServicedComponent.ServicedComponent"]/*' /> public ServicedComponent() { ServicedComponentProxy pxy = RemotingServices.GetRealProxy(this) as ServicedComponentProxy; DBG.Assert(pxy != null, "RealProxy() is null during constructor!"); pxy.SuppressFinalizeServer(); Type thisType = this.GetType(); _denyRemoteDispatch = ServicedComponentInfo.AreMethodsSecure(thisType); // Get the methodinfo for finalize... // REVIEW: Do we have to do anything special to make sure we // get the one furthest down the chain? bool bFoundInCache = false; _finalize = _finalizeCache.Get(thisType, out bFoundInCache) as MethodInfo; if (bFoundInCache == false) { _finalize = GetDeclaredFinalizer(thisType); _finalizeCache.Put(thisType, _finalize); } _calledDispose = false; }
public ServicedComponent() { (RemotingServices.GetRealProxy(this) as ServicedComponentProxy).SuppressFinalizeServer(); Type t = base.GetType(); this._denyRemoteDispatch = ServicedComponentInfo.AreMethodsSecure(t); bool bFound = false; this._finalize = _finalizeCache.Get(t, out bFound) as MethodInfo; if (!bFound) { this._finalize = GetDeclaredFinalizer(t); _finalizeCache.Put(t, this._finalize); } this._calledDispose = false; }