示例#1
0
 /// <summary>
 /// Initialization
 /// </summary>
 protected override void OnOpen(TimeSpan timeout)
 {
     // Get a mail handler object from the binding
     pMailHandler = RaspEmailBindingElement.GetRaspMailHandlerFromBindingContext(pContext);
     pMailHandler.OnExceptionThrown  += new MailboxExceptionThrown(CallbackMailExceptionThrown);
     pMailHandler.OnInboxStateChange += new OnInboxStateChangeDelegate(CallbackOnInboxStateChange);
 }
示例#2
0
        /// <summary>
        /// OnCreateChannel event
        /// </summary>
        /// <param name="address"></param>
        /// <param name="via"></param>
        /// <returns></returns>
        protected override IRequestChannel OnCreateChannel(System.ServiceModel.EndpointAddress address, Uri via)
        {
            // Get a mail handler object from the binding
            RaspMailHandler mailHandler = RaspEmailBindingElement.GetRaspMailHandlerFromBindingContext(pBindingContext);

            mailHandler.OnExceptionThrown += new MailboxExceptionThrown(mailHandler_OnExceptionThrown);
            // Create the channel
            return(new RaspEmailRequestChannel(mailHandler, address, this));
        }