internal static void Build(Dictionary<MonikerHelper.MonikerAttribute, string> propertyTable, ref Guid riid, IntPtr ppv)
        {
            if (IntPtr.Zero == ppv)
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("ppv");

            Marshal.WriteIntPtr(ppv, IntPtr.Zero);

            string temp;
            IProxyCreator proxyCreator = null;
            if (propertyTable.TryGetValue(MonikerHelper.MonikerAttribute.Wsdl, out temp))
            {
                proxyCreator = new WsdlServiceChannelBuilder(propertyTable);
            }
            else if (propertyTable.TryGetValue(MonikerHelper.MonikerAttribute.MexAddress, out temp))
            {
                proxyCreator = new MexServiceChannelBuilder(propertyTable);
            }
            else
            {
                proxyCreator = new TypedServiceChannelBuilder(propertyTable);
            }
            IProxyManager proxyManager = new ProxyManager(proxyCreator);

            Marshal.WriteIntPtr(ppv, OuterProxyWrapper.CreateOuterProxyInstance(proxyManager, ref riid));

        }
 public static IntPtr CreateTransactionProxyTearOff(TransactionProxy txProxy)
 {
     IProxyCreator proxyCreator = new TransactionProxyBuilder(txProxy);
     IProxyManager proxyManager = new ProxyManager(proxyCreator);
     Guid gUID = typeof(ITransactionProxy).GUID;
     return OuterProxyWrapper.CreateOuterProxyInstance(proxyManager, ref gUID);
 }
 public static MarshalByRefObject CreateMonikerInstance()
 {
     IProxyCreator proxyCreator = new MonikerBuilder();
     IProxyManager proxyManager = new ProxyManager(proxyCreator);
     Guid gUID = typeof(IMoniker).GUID;
     IntPtr punk = OuterProxyWrapper.CreateOuterProxyInstance(proxyManager, ref gUID);
     MarshalByRefObject obj2 = EnterpriseServicesHelper.WrapIUnknownWithComObject(punk) as MarshalByRefObject;
     Marshal.Release(punk);
     return obj2;
 }
        public static MarshalByRefObject CreateMonikerInstance()
        {
            IProxyCreator serviceChannelBuilder = new MonikerBuilder();
            IProxyManager proxyManager = new ProxyManager(serviceChannelBuilder);
            Guid iid = typeof(IMoniker).GUID;
            IntPtr ppv = OuterProxyWrapper.CreateOuterProxyInstance(proxyManager, ref iid);
            MarshalByRefObject ret = EnterpriseServicesHelper.WrapIUnknownWithComObject(ppv) as MarshalByRefObject;
            Marshal.Release(ppv);

            return ret;
        }