protected override void OnAddCommand() { var newCPU = new CPU(); var newDevice = new Device(); newCPU.Device = newDevice; this.Context.CPUs.Add(newCPU); this.CPUsView.MoveCurrentTo(newCPU); }
private bool FilterCPU(CPU entity) { return (entity.Id == this.CPUId); }
private bool FilterCPUs(CPU entity) { return (entity.SocketId == this.Id); }
private void DetachCPUs(CPU entity) { entity.Socket = null; }
private void AttachCPUs(CPU entity) { entity.Socket = this; }
private void DetachCPUs(CPU entity) { entity.GPU = null; }
private void AttachCPUs(CPU entity) { entity.GPU = this; }
private bool FilterCPUs(CPU entity) { return (entity.DeviceId == this.Id); }
private void DetachCPUs(CPU entity) { entity.Device = null; }
private void AttachCPUs(CPU entity) { entity.Device = this; }
/// <summary> /// Deprecated Method for adding a new object to the CPUs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToCPUs(CPU cPU) { base.AddObject("CPUs", cPU); }
/// <summary> /// Create a new CPU object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="frequency">Initial value of the Frequency property.</param> /// <param name="сacheOne">Initial value of the СacheOne property.</param> /// <param name="сacheTwo">Initial value of the СacheTwo property.</param> /// <param name="сacheThree">Initial value of the СacheThree property.</param> /// <param name="cores">Initial value of the Cores property.</param> /// <param name="socketId">Initial value of the SocketId property.</param> /// <param name="deviceId">Initial value of the DeviceId property.</param> public static CPU CreateCPU(global::System.Int32 id, global::System.Double frequency, global::System.Int16 сacheOne, global::System.Int16 сacheTwo, global::System.Int16 сacheThree, global::System.Int16 cores, global::System.Int32 socketId, global::System.Int32 deviceId) { CPU cPU = new CPU(); cPU.Id = id; cPU.Frequency = frequency; cPU.СacheOne = сacheOne; cPU.СacheTwo = сacheTwo; cPU.СacheThree = сacheThree; cPU.Cores = cores; cPU.SocketId = socketId; cPU.DeviceId = deviceId; return cPU; }