internal static ComProxy Create(IntPtr outer, ContractDescription contract, IProvideChannelBuilderSettings channelBuilderSettings) { DispatchProxy proxy = null; IntPtr inner = IntPtr.Zero; ComProxy comProxy = null; try { proxy = new DispatchProxy(contract, channelBuilderSettings); inner = OuterProxyWrapper.CreateDispatchProxy(outer, proxy); comProxy = new ComProxy(inner, proxy); return comProxy; } finally { if (comProxy == null) { if (proxy != null) { ((IDisposable)proxy).Dispose(); } if (inner != IntPtr.Zero) { Marshal.Release(inner); } } } }
internal static ComProxy Create(IntPtr outer, ContractDescription contract, IProvideChannelBuilderSettings channelBuilderSettings) { DispatchProxy proxy = null; ComProxy proxy3; IntPtr zero = IntPtr.Zero; ComProxy proxy2 = null; try { proxy = new DispatchProxy(contract, channelBuilderSettings); zero = OuterProxyWrapper.CreateDispatchProxy(outer, proxy); proxy2 = new ComProxy(zero, proxy); proxy3 = proxy2; } finally { if (proxy2 == null) { if (proxy != null) { ((IDisposable) proxy).Dispose(); } if (zero != IntPtr.Zero) { Marshal.Release(zero); } } } return proxy3; }
ComProxy IProxyCreator.CreateProxy(IntPtr outer, ref Guid riid) { if (riid != InterfaceID.idIDispatch) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidCastException(System.ServiceModel.SR.GetString("NoInterface", new object[] { (Guid)riid }))); } if (this.contractDescription == null) { throw Fx.AssertAndThrow("ContractDescription should not be null at this point"); } return(DispatchProxy.Create(outer, this.contractDescription, this)); }
ComProxy IProxyCreator.CreateProxy(IntPtr outer, ref Guid riid) { IntPtr inner = IntPtr.Zero; if (riid != InterfaceID.idIDispatch) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidCastException(SR.GetString(SR.NoInterface, riid))); } if (contractDescription == null) { throw Fx.AssertAndThrow("ContractDescription should not be null at this point"); } return(DispatchProxy.Create(outer, contractDescription, this)); }
public ComPlusDispatchMethodSchema(string name, List<DispatchProxy.ParamInfo> paramList, DispatchProxy.ParamInfo returnValue) { this.name = name; this.paramList = paramList; this.returnValue = returnValue; }