예제 #1
0
        public static Transport Create(AddressEntry entry)
        {
            switch (entry.Method)
            {
            case "tcp":
            {
                Transport transport = new SocketTransport();
                transport.Open(entry);
                return(transport);
            }

#if !PORTABLE
            case "unix":
            {
                //Transport transport = new UnixMonoTransport ();
                Transport transport = new UnixNativeTransport();
                transport.Open(entry);
                return(transport);
            }
#endif
#if ENABLE_PIPES
            case "win": {
                Transport transport = new PipeTransport();
                transport.Open(entry);
                return(transport);
            }
#endif
            default:
                throw new NotSupportedException("Transport method \"" + entry.Method + "\" not supported");
            }
        }
예제 #2
0
		public static Transport Create (AddressEntry entry)
		{
			switch (entry.Method) {
				case "tcp":
				{
					Transport transport = new SocketTransport ();
					transport.Open (entry);
					return transport;
				}
#if !PORTABLE
				case "unix":
				{
					//Transport transport = new UnixMonoTransport ();
					Transport transport = new UnixNativeTransport ();
					transport.Open (entry);
					return transport;
				}
#endif
				default:
					throw new NotSupportedException ("Transport method \"" + entry.Method + "\" not supported");
			}
		}