Пример #1
0
        public static void BindToMoniker()
        {
            String monikerName = null;

            if (PlatformDetection.IsWindows)
            {
                Assert.Throws <ArgumentException>(() => Marshal.BindToMoniker(monikerName));
            }
            else
            {
                Assert.Throws <PlatformNotSupportedException>(() => Marshal.BindToMoniker(monikerName));
            }
        }
Пример #2
0
 public static void BindToMoniker()
 {
     if (PlatformDetection.IsWindows && !PlatformDetection.IsNetNative)
     {
         if (PlatformDetection.IsNotWindowsNanoServer)
         {
             AssertExtensions.Throws <ArgumentException>(null, () => Marshal.BindToMoniker(null));
         }
     }
     else
     {
         Assert.Throws <PlatformNotSupportedException>(() => Marshal.BindToMoniker(null));
     }
 }