//***************************************************************************** // Description.....Null Transport // // Author..........Roman Kiss, rkiss@pathcom.com // Copyright © 2007 ATZ Consulting Inc. (see included license.rtf file) // // Date Created: 07/07/07 // // Date Modified By Description //----------------------------------------------------------------------------- // 07/07/07 Roman Kiss Initial Revision // 04/04/11 Roman Kiss Modify for workflow channel // 07/07/11 Roman Kiss Modify for azure channel //***************************************************************************** // #region Namespaces using System; using System.ServiceModel.Channels; #endregion namespace RKiss.CustomChannels { public class WebRolePublisherTransportBindingElement : TransportBindingElement { public string RepositorySettingName { get; set; } #region Constructors public WebRolePublisherTransportBindingElement() : base() { } public WebRolePublisherTransportBindingElement(WebRolePublisherTransportBindingElement elementToBeCloned) : base(elementToBeCloned) { this.RepositorySettingName = elementToBeCloned.RepositorySettingName; } #endregion #region Overrides public override string Scheme { get { return "webrole.pub"; } } public override BindingElement Clone() { return new WebRolePublisherTransportBindingElement(this); } public override T GetProperty<T>(BindingContext context) { if (context == null) { throw new ArgumentNullException("context"); } return base.GetProperty<T>(context); } public override bool CanBuildChannelFactory<TChannel>(BindingContext context) { return typeof(TChannel) == typeof(IOutputChannel) || typeof(TChannel) == typeof(IOutputSessionChannel); } public override bool CanBuildChannelListener<TChannel>(BindingContext context) { throw new NotSupportedException("Listener is not supported"); } public override IChannelFactory<TChannel> BuildChannelFactory<TChannel>(BindingContext context) { if (context == null) { throw new ArgumentNullException("context"); } if (!this.CanBuildChannelFactory<TChannel>(context)) { throw new InvalidOperationException(string.Format("ChannelTypeNotSupported - {0}", typeof(TChannel).Name)); } if (base.ManualAddressing) { throw new InvalidOperationException("ManualAddressingNotSupported"); } return new WebRolePublisherChannelFactory<TChannel>(this, context); } public override IChannelListener<TChannel> BuildChannelListener<TChannel>(BindingContext context) { throw new NotSupportedException("Listener is not supported"); } #endregion } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)