Exemplo n.º 1
0
 ComProxy GenerateIntrinsic(IntPtr outerProxy, ref Guid riid)
 {
     if (proxyCreator.SupportsIntrinsics())
     {
         if (riid == typeof(IChannelOptions).GUID)
         {
             return(ChannelOptions.Create(outerProxy, proxyCreator as IProvideChannelBuilderSettings));
         }
         else if (riid == typeof(IChannelCredentials).GUID)
         {
             return(ChannelCredentials.Create(outerProxy, proxyCreator as IProvideChannelBuilderSettings));
         }
         else
         {
             throw Fx.AssertAndThrow("Given IID is not an intrinsic");
         }
     }
     else
     {
         throw Fx.AssertAndThrow("proxyCreator does not support intrinsic");
     }
 }