コード例 #1
0
        // If we ever want to make an implementation of INetwork that we want in core,
        /// <summary>
        /// Creates an INetwork instance of the specified network type.
        /// </summary>
        /// <param name="networkType">Type of the file.</param>
        /// <returns></returns>
        internal static INetwork Create(NetworkType networkType)
        {
            INetwork network = new NetworkAsynch();

            switch (networkType)
            {
                case NetworkType.NetworkAsynch:
                    network = new NetworkAsynch();
                    break;
                case NetworkType.NetworkSynch:
                    network = new NetworkSynch();
                    break;
                default:
                    // returns the default - BasicNetwork implementation                 
                    break;
            }

            return network;
        }
コード例 #2
0
        // If we ever want to make an implementation of INetwork that we want in core,
        /// <summary>
        /// Creates an INetwork instance of the specified network type.
        /// </summary>
        /// <param name="networkType">Type of the file.</param>
        /// <returns></returns>
        internal static INetwork Create(NetworkType networkType)
        {
            INetwork network = new NetworkAsynch();

            switch (networkType)
            {
            case NetworkType.NetworkAsynch:
                network = new NetworkAsynch();
                break;

            case NetworkType.NetworkSynch:
                network = new NetworkSynch();
                break;

            default:
                // returns the default - BasicNetwork implementation
                break;
            }

            return(network);
        }
コード例 #3
0
        /// <summary>
        /// Creates an INetwork instance.
        /// </summary>
        /// <returns></returns>
        internal static INetwork Create()
        {
            INetwork network = new NetworkAsynch();

            return(network);
        }
コード例 #4
0
 /// <summary>
 /// Creates an INetwork instance.
 /// </summary>
 /// <returns></returns>
 internal static INetwork Create()
 {
     INetwork network = new NetworkAsynch();
     return network;
 }