Пример #1
0
		public HttpListenerManager GetOrCreateManager (Uri uri)
		{
			var m = listeners.FirstOrDefault (p => p.Key.Equals (uri)).Value;
			if (m == null) {
				if (ServiceHostingEnvironment.InAspNet)
					m = new AspNetHttpListenerManager (uri);
				else
					m = new HttpStandaloneListenerManager (uri);
				listeners [uri] = m;
			}
			return m;
		}
Пример #2
0
        HttpListenerManager CreateListenerManager(Uri uri)
        {
            HttpListenerManager m;

            if (ServiceHostingEnvironment.InAspNet)
            {
                m = new AspNetHttpListenerManager(uri);
            }
            else
            {
                m = new HttpStandaloneListenerManager(uri);
            }
            listeners [uri] = m;

            return(m);
        }
Пример #3
0
        HttpListenerManager CreateListenerManager(Uri uri, HttpTransportBindingElement element)
        {
            HttpListenerManager m;

            if (ServiceHostingEnvironmentInternal.InAspNet)
            {
                m = new AspNetHttpListenerManager(uri);
            }
            else
            {
                m = new HttpStandaloneListenerManager(uri, element);
            }
            listeners [uri] = m;

            return(m);
        }
Пример #4
0
		HttpListenerManager CreateListenerManager (Uri uri, HttpTransportBindingElement element)
		{
			HttpListenerManager m;
			
			if (ServiceHostingEnvironment.InAspNet)
				m = new AspNetHttpListenerManager (uri);
			else
				m = new HttpStandaloneListenerManager (uri, element);
			listeners [uri] = m;

			return m;
		}