Ejemplo n.º 1
0
        public double this[int address]
        {
            get
            {
                //Contract.Requires(address >= 0);
                //Contract.Requires(address < this.Capacity);

                return(this.data[address]);
            }
            set
            {
                //Contract.Requires(address >= 0);
                //Contract.Requires(address < this.Capacity);

                var oldValue = this.data[address];
                this.data[address] = value;
                if (this.CellValueChanged != null)
                {
                    var eventArgs = new MemoryCellValueChangedEventArgs(address, oldValue, value);
                    this.CellValueChanged(this, eventArgs);
                }
            }
        }
Ejemplo n.º 2
0
        public double this[int address]
        {
            get
            {
                //Contract.Requires(address >= 0);
                //Contract.Requires(address < this.Capacity);

                return this.data[address];
            }
            set
            {
                //Contract.Requires(address >= 0);
                //Contract.Requires(address < this.Capacity);

                var oldValue = this.data[address];
                this.data[address] = value;
                if (this.CellValueChanged != null)
                {
                    var eventArgs = new MemoryCellValueChangedEventArgs(address, oldValue, value);
                    this.CellValueChanged(this, eventArgs);
                }
            }
        }