Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LocalNetwork"/> class.
        /// </summary>
        /// <param name="commonNetworkServices">The common network services.</param>
        /// <param name="networkAdapter">The network adapter.</param>
        /// <param name="logger">The logger.</param>
        /// <autogeneratedoc />
        public LocalNetwork(ICommonNetworkServices commonNetworkServices, INetworkAdapter networkAdapter,
                            IPureLogger logger = null) :
            base(commonNetworkServices, DeviceType.LocalNetwork, logger)
        {
            NetworkAdapterCollection = new NetworkAdapterCollection();
            NetworkGateway           = _DiscoverNetworkGateway();

            NetworkIPAddressSubnet = networkAdapter.NetworkAddressSubnet;

            AddAdapterToNetwork(networkAdapter);
        }
Beispiel #2
0
 /// <summary>
 /// Adds the adapter to network.
 /// </summary>
 /// <param name="networkAdapter">The network adapter.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 /// <autogeneratedoc />
 public bool AddAdapterToNetwork(INetworkAdapter networkAdapter)
 {
     return(NetworkAdapterCollection.Add(networkAdapter));
 }
Beispiel #3
0
 /// <summary>
 /// Adapters the connected to network.
 /// </summary>
 /// <param name="networkAdapter">The network adapter.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 /// <autogeneratedoc />
 public bool AdapterConnectedToNetwork(INetworkAdapter networkAdapter)
 {
     return(NetworkAdapterCollection.Contains(networkAdapter));
 }
Beispiel #4
0
 /// <summary>
 /// Removes the adapter from network.
 /// </summary>
 /// <param name="networkAdapter">The network adapter.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 /// <autogeneratedoc />
 public bool RemoveAdapterFromNetwork(INetworkAdapter networkAdapter)
 {
     return(NetworkAdapterCollection.Remove(networkAdapter));
 }