Manages a connection point with a COM server.
상속: IDisposable
예제 #1
0
	    /// <summary>
	    /// Initializes the object with the containing subscription object.
	    /// </summary>
	    public ComDaDataCallback(ComDaGroup group)
	    { 
            // save group.
            m_group = group;

		    // create connection point.
		    m_connectionPoint = new ConnectionPoint(group.Unknown, typeof(OpcRcw.Da.IOPCDataCallback).GUID);

		    // advise.
		    m_connectionPoint.Advise(this);
	    }
예제 #2
0
	    /// <summary>
	    /// Initializes the object with the containing subscription object.
	    /// </summary>
	    public ComAeEventSink(ComAeSubscriptionClient subscription)
	    { 
            // save group.
            m_subscription = subscription;

		    // create connection point.
		    m_connectionPoint = new ConnectionPoint(subscription.Unknown, typeof(IOPCEventSink).GUID);

		    // advise.
		    m_connectionPoint.Advise(this);
	    }
예제 #3
0
	    /// <summary>
	    /// Initializes the object with the containing subscription object.
	    /// </summary>
        public ComHdaDataCallback(ComHdaClient server)
	    { 
            // save group.
            m_server = server;

		    // create connection point.
            m_connectionPoint = new ConnectionPoint(server.Unknown, typeof(OpcRcw.Hda.IOPCHDA_DataCallback).GUID);

		    // advise.
		    m_connectionPoint.Advise(this);
	    }
예제 #4
0
	    /// <summary>
	    /// Initializes the object with the containing subscription object.
	    /// </summary>
	    public ShutdownCallback(object server, ServerShutdownEventHandler handler)
	    { 
		    try
		    {
                m_server  = server;
                m_handler = handler;

			    // create connection point.
			    m_connectionPoint = new ConnectionPoint(server, typeof(OpcRcw.Comn.IOPCShutdown).GUID);

			    // advise.
			    m_connectionPoint.Advise(this);
		    }
		    catch (Exception e)
		    {
			    throw new ServiceResultException(e, StatusCodes.BadOutOfService);
		    }
	    }
예제 #5
0
        /// <summary>
        /// Initializes the object with the containing subscription object.
        /// </summary>
        public ShutdownCallback(object server, ServerShutdownEventHandler handler)
        {
            try
            {
                m_server  = server;
                m_handler = handler;

                // create connection point.
                m_connectionPoint = new ConnectionPoint(server, typeof(OpcRcw.Comn.IOPCShutdown).GUID);

                // advise.
                m_connectionPoint.Advise(this);
            }
            catch (Exception e)
            {
                throw new ServiceResultException(e, StatusCodes.BadOutOfService);
            }
        }