protected override void OnStart()
 {
     NamedPipeHostedTransportConfiguration configuration = 
         HostedTransportConfigurationManager.GetConfiguration(Uri.UriSchemeNetPipe) as NamedPipeHostedTransportConfiguration;
     transportManager = configuration.TransportManager as HostedNamedPipeTransportManager;
     transportManager.Start(listenerChannelContext.ListenerChannelId, listenerChannelContext.Token, OnMessageReceived);
 }
 public NamedPipeHostedTransportConfiguration() : base(Uri.UriSchemeNetPipe)
 {
     string[] bindings = HostedTransportConfigurationManager.MetabaseSettings.GetBindings(Uri.UriSchemeNetPipe);
     for (int i = 0; i < bindings.Length; i++)
     {
         BaseUriWithWildcard baseAddress = BaseUriWithWildcard.CreateHostedPipeUri(bindings[i], HostingEnvironmentWrapper.ApplicationVirtualPath);
         if (i == 0)
         {
             this.uniqueManager = new HostedNamedPipeTransportManager(baseAddress);
         }
         base.ListenAddresses.Add(baseAddress);
         NamedPipeChannelListener.StaticTransportManagerTable.RegisterUri(baseAddress.BaseAddress, baseAddress.HostNameComparisonMode, this.uniqueManager);
     }
 }
示例#3
0
 public NamedPipeHostedTransportConfiguration() : base(Uri.UriSchemeNetPipe)
 {
     string[] bindings = HostedTransportConfigurationManager.MetabaseSettings.GetBindings(Uri.UriSchemeNetPipe);
     for (int i = 0; i < bindings.Length; i++)
     {
         BaseUriWithWildcard baseAddress = BaseUriWithWildcard.CreateHostedPipeUri(bindings[i], HostingEnvironmentWrapper.ApplicationVirtualPath);
         if (i == 0)
         {
             this.uniqueManager = new HostedNamedPipeTransportManager(baseAddress);
         }
         base.ListenAddresses.Add(baseAddress);
         NamedPipeChannelListener.StaticTransportManagerTable.RegisterUri(baseAddress.BaseAddress, baseAddress.HostNameComparisonMode, this.uniqueManager);
     }
 }