private bool disposedValue = false; // To detect redundant calls

        #endregion Fields

        #region Constructors

        internal NetHwInterface(INetDevice parent, string name)
        {
            unchecked { n++; }
            if (parent == null)
                throw new ArgumentNullException("parent");
            if (name == null)
                throw new ArgumentNullException("name");
            if (name == string.Empty)
                throw new ArgumentException("name can not be empty");
            this.parent = parent;
            this.name = name;
            this.hardwareAddress = new NetMacAddress(((ulong)DateTime.Now.Ticks << 8) + n);
        }
        private bool disposedValue = false;         // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    this.parent         = null;
                    this.otherInterface = null;
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }
 internal NetHwInterface(INetDevice parent, string name)
 {
     unchecked { n++; }
     if (parent == null)
     {
         throw new ArgumentNullException("parent");
     }
     if (name == null)
     {
         throw new ArgumentNullException("name");
     }
     if (name == string.Empty)
     {
         throw new ArgumentException("name can not be empty");
     }
     this.parent          = parent;
     this.name            = name;
     this.hardwareAddress = new NetMacAddress(((ulong)DateTime.Now.Ticks << 8) + n);
 }
        private bool disposedValue = false; // To detect redundant calls

        #endregion Fields

        #region Constructors

        internal NetLgInterface(INetDevice parent, string name)
            : base(parent, name)
        {
        }
 public void Cleanup( )
 {
     fakeDevice = null;
 }
 public void Setup( )
 {
     fakeDevice = new Abstract.Fakes.StubINetDevice( );
 }
Ejemplo n.º 7
0
 internal NetLgInterface(INetDevice parent, string name) : base(parent, name)
 {
 }
 public void Setup( )
 {
     fakeDevice = new Abstract.Fakes.StubINetDevice( );
 }
 public void Cleanup( )
 {
     fakeDevice = null;
 }
Ejemplo n.º 10
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue) {
                if (disposing) {
                    this.parent = null;
                    this.otherInterface = null;
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }