BitmapEffectOutputConnector.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Media / Effects / BitmapEffectOutputConnector.cs / 1 / BitmapEffectOutputConnector.cs

                            //------------------------------------------------------------------------------ 
//  Microsoft Avalon
//  Copyright (c) Microsoft Corporation, 2005
//
//  File:       BitmapEffectOutputConnector.cs 
//-----------------------------------------------------------------------------
 
using MS.Internal; 
using System;
using System.IO; 
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Diagnostics;
using System.Reflection; 
using System.Runtime.InteropServices;
using System.Windows; 
using System.Windows.Media; 
using System.Windows.Markup;
using System.Windows.Media.Animation; 
using System.Windows.Media.Composition;

namespace System.Windows.Media.Effects
{ 
    /// 
    /// BitmapEffectOutputConnector 
    ///  
    internal class BitmapEffectOutputConnector
    { 
        SafeMILHandle /*IMILBitmapEffectOutputConnector*/ connector;
        internal BitmapEffectOutputConnector(SafeMILHandle nativeConnector)
        {
            Debug.Assert(nativeConnector != null); 
            connector = nativeConnector;
        } 
 
        internal SafeMILHandle NativeConnectorSafeHandle
        { 
            get
            {
                return connector;
            } 
        }
 
#if never 
        /// 
        /// Returns true if the output connector is connected 
        /// 
        public bool IsConnected
        {
            get 
            {
                Debug.Assert(connector != null); 
                bool fIsConnected; 
                HRESULT.Check(MS.Win32.PresentationCore.UnsafeNativeMethods.IMILBitmapEffectConnector.IsConnected(connector, out fIsConnected));
                return fIsConnected; 
            }
        }

        ///  
        /// Returns the number of connections
        ///  
        public int Connections 
        {
            get 
            {
                uint iNumConnections;
                HRESULT.Check(MS.Win32.PresentationCore.UnsafeNativeMethods.IMILBitmapEffectOutputConnector.GetNumberConnections(connector,
                                                                                                                out iNumConnections)); 
                return (int)iNumConnections;
            } 
        } 

        ///  
        /// Return input connector
        /// 
        /// connector index
        /// input connector 
        public BitmapEffectInputConnector GetConnection(int index)
        { 
            SafeMILHandle connection; 
            HRESULT.Check(MS.Win32.PresentationCore.UnsafeNativeMethods.IMILBitmapEffectOutputConnector.GetConnection(connector, (uint)index,
                                                                                                     out connection)); 
            return new BitmapEffectInputConnector(connection);
        }
#endif
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------ 
//  Microsoft Avalon
//  Copyright (c) Microsoft Corporation, 2005
//
//  File:       BitmapEffectOutputConnector.cs 
//-----------------------------------------------------------------------------
 
using MS.Internal; 
using System;
using System.IO; 
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Diagnostics;
using System.Reflection; 
using System.Runtime.InteropServices;
using System.Windows; 
using System.Windows.Media; 
using System.Windows.Markup;
using System.Windows.Media.Animation; 
using System.Windows.Media.Composition;

namespace System.Windows.Media.Effects
{ 
    /// 
    /// BitmapEffectOutputConnector 
    ///  
    internal class BitmapEffectOutputConnector
    { 
        SafeMILHandle /*IMILBitmapEffectOutputConnector*/ connector;
        internal BitmapEffectOutputConnector(SafeMILHandle nativeConnector)
        {
            Debug.Assert(nativeConnector != null); 
            connector = nativeConnector;
        } 
 
        internal SafeMILHandle NativeConnectorSafeHandle
        { 
            get
            {
                return connector;
            } 
        }
 
#if never 
        /// 
        /// Returns true if the output connector is connected 
        /// 
        public bool IsConnected
        {
            get 
            {
                Debug.Assert(connector != null); 
                bool fIsConnected; 
                HRESULT.Check(MS.Win32.PresentationCore.UnsafeNativeMethods.IMILBitmapEffectConnector.IsConnected(connector, out fIsConnected));
                return fIsConnected; 
            }
        }

        ///  
        /// Returns the number of connections
        ///  
        public int Connections 
        {
            get 
            {
                uint iNumConnections;
                HRESULT.Check(MS.Win32.PresentationCore.UnsafeNativeMethods.IMILBitmapEffectOutputConnector.GetNumberConnections(connector,
                                                                                                                out iNumConnections)); 
                return (int)iNumConnections;
            } 
        } 

        ///  
        /// Return input connector
        /// 
        /// connector index
        /// input connector 
        public BitmapEffectInputConnector GetConnection(int index)
        { 
            SafeMILHandle connection; 
            HRESULT.Check(MS.Win32.PresentationCore.UnsafeNativeMethods.IMILBitmapEffectOutputConnector.GetConnection(connector, (uint)index,
                                                                                                     out connection)); 
            return new BitmapEffectInputConnector(connection);
        }
#endif
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK