How to integrate BizTalk Server 2010 / 2013 with Service Bus for Windows Server

This solution shows how to integrate a BizTalk Server 2010/2013 application with Service Bus for Windows Server using the WCF-Custom adapter to exchange messages with external systems in a reliable, flexible, and scalable manner.

C# (5.3 MB)
 
 
 
 
 
4.7 Star
(6)
1,705 times
Add to favorites
6/20/2014
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
#region Copyright
//=======================================================================================
//Microsoft Windows Server AppFabric Customer Advisory Team (CAT)  
//
// This sample is supplemental to the technical guidance published on the community
// blog at http://blogs.msdn.com/paolos. 
// 
// Author: Paolo Salvatori
//=======================================================================================
// Copyright © 2011 Microsoft Corporation. All rights reserved.
// 
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER 
// EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF 
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. YOU BEAR THE RISK OF USING IT.
//=======================================================================================
#endregion

#region Using Directives
using System;
using System.IO;
using System.Diagnostics;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Runtime.InteropServices;
#endregion

namespace Microsoft.WindowsAzure.CAT.Samples.ServiceBusForWindowsServer.Client
{
    public class LogTraceListener : TraceListener
    {
        #region Public Constructors
        /// <summary>
        /// Initializes a new instance of the LogTraceListener class.
        /// </summary>
        public LogTraceListener()
        {
        }

        /// <summary>
        /// Initializes a new instance of the LogTraceListener class.
        /// </summary>
        /// <param name="name">The name of the LogTraceListener.</param>
        public LogTraceListener(string name)
            : base(name)
        {
        } 
        #endregion

        #region Public Methods
        /// <summary>
        /// Writes the specified message to the log ListBox on the UI of the MainForm.
        /// </summary>
        /// <param name="message">The message to write.</param>
        public override void Write(string message)
        {
            MainForm.StaticWriteToLog(message);
        }

        /// <summary>
        /// Writes the specified message to the log ListBox on the UI of the MainForm.
        /// </summary>
        /// <param name="message">The message to write.</param>
        public override void WriteLine(string message)
        {
            MainForm.StaticWriteToLog(message);
        }
        
        /// <summary>
        /// Emits an error message to the log ListBox on the UI of the MainForm.
        /// </summary>
        /// <param name="message">The error message to write.</param>
        public override void Fail(string message)
        {
            MainForm.StaticWriteToLog(message);
        }
        #endregion
    }
}