Пример #1
0
        /// <summary>
        /// Creates a copy of this object.
        /// </summary>
        /// <returns>A new <see cref="DotRas.RasNetworkProtocols"/> object.</returns>
        public object Clone()
        {
            var retval = new RasNetworkProtocols();

#pragma warning disable 0618
            retval.NetBeui = NetBeui;
#pragma warning restore 0618
            retval.Ipx = Ipx;
            retval.IP  = IP;

#if (WIN2K8 || WIN7 || WIN8)
            retval.IPv6 = IPv6;
#endif

            return(retval);
        }
Пример #2
0
        public void NetworkProtocolsTest()
        {
            string name = "Test Entry";
            RasNetworkProtocols expected = new RasNetworkProtocols()
            {
                IP = true
            };

            RasEntry target = new RasEntry(name);
            target.NetworkProtocols = expected;

            RasNetworkProtocols actual = target.NetworkProtocols;

            Assert.AreSame(expected, actual);
        }
Пример #3
0
        /// <summary>
        /// Creates a copy of this object.
        /// </summary>
        /// <returns>A new <see cref="DotRas.RasNetworkProtocols"/> object.</returns>
        public object Clone()
        {
            RasNetworkProtocols retval = new RasNetworkProtocols();

#pragma warning disable 0618
            retval.NetBeui = this.NetBeui;
#pragma warning restore 0618
            retval.Ipx = this.Ipx;
            retval.IP = this.IP;

#if (WIN2K8 || WIN7 || WIN8)

            retval.IPv6 = this.IPv6;

#endif

            return retval;
        }