Esempio n. 1
0
        public Client(string beaconType, int discoveryPort)
        {
            if (string.IsNullOrEmpty(beaconType))
            {
                throw new ArgumentNullException("beaconType");
            }
            if (discoveryPort < 1)
            {
                throw new ArgumentOutOfRangeException("discoveryPort");
            }

            this._beaconType    = beaconType;
            this._discoveryPort = discoveryPort;

            this._probe = new Lib.Probe(this._beaconType);
        }
Esempio n. 2
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // TODO: dispose managed state (managed objects).

                    this._probe.Dispose();
                }

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

                disposedValue = true;
            }
        }