/// <summary> /// 获取所有任务数据 /// </summary> /// <returns></returns> public List <TaskMessageModel> GetTaskMessageList(InstructionCondition con) { List <TaskMessageModel> retData = new List <TaskMessageModel>(); InstructionServiceClient client = null; try { client = new InstructionServiceClient(); List <TaskMessage> data = client.GetTaskMessageList(); data.ForEach(t => { TaskMessageModel model = MappingHelper.From <TaskMessageModel, TaskMessage>(t); retData.Add(model); }); con.RecordCount = retData.Count; } finally { if (client != null) { client.Close(); } } return(retData.Skip(con.Offset).Take(con.PageSize).ToList()); }
/// <summary> /// Initializes a new instance of the <see cref="Set"/> class. /// </summary> /// <param name="destination">The destination memory operand.</param> /// <param name="condition">The condition on which this instruction executes.</param> public Set(EffectiveAddress destination, InstructionCondition condition) : this((Operand)destination, condition) { #region Contract Contract.Requires <ArgumentNullException>(destination != null); Contract.Requires <InvalidEnumArgumentException>(Enum.IsDefined(typeof(InstructionCondition), condition)); Contract.Requires <ArgumentException>(condition != InstructionCondition.None); #endregion }
/// <summary> /// Initializes a new instance of the <see cref="Cmov"/> class. /// </summary> /// <param name="destination">The destination register.</param> /// <param name="source">The source memory operand.</param> /// <param name="condition">The condition on which this instruction executes.</param> public Cmov(RegisterOperand destination, EffectiveAddress source, InstructionCondition condition) : this(destination, (Operand)source, condition) { #region Contract Contract.Requires <ArgumentNullException>(destination != null); Contract.Requires <ArgumentNullException>(source != null); Contract.Requires <InvalidEnumArgumentException>(Enum.IsDefined(typeof(InstructionCondition), condition)); Contract.Requires <ArgumentException>(condition != InstructionCondition.None); #endregion }
/// <summary> /// Gets the 8-bit condition code as used by the instruction set. /// </summary> /// <param name="condition">The <see cref="InstructionCondition"/>.</param> /// <returns>The condition code.</returns> public static int GetConditionCode(this InstructionCondition condition) { #region Contract Contract.Requires <InvalidEnumArgumentException>(Enum.IsDefined(typeof(InstructionCondition), condition)); Contract.Ensures(Contract.Result <int>() >= 0x00); Contract.Ensures(Contract.Result <int>() <= 0xFF); #endregion return(((int)condition) & 0xFF); }
public ActionResult List(InstructionCondition con) { InstructionServiceBusiness bus = new InstructionServiceBusiness(); List <TaskMessageModel> messageList = bus.GetTaskMessageList(con); string json = JsonConvert.SerializeObject( new { rows = messageList, total = con.RecordCount }, JsonConvertHelper.IsoDateTimeConverter ); return(Content(json)); }
/// <summary> /// Initializes a new instance of the <see cref="J"/> class. /// </summary> /// <param name="offset">The jump offset.</param> /// <param name="condition">The condition on which this instruction executes.</param> public J(RelativeOffset offset, InstructionCondition condition) { #region Contract Contract.Requires <ArgumentNullException>(offset != null); Contract.Requires <InvalidEnumArgumentException>(Enum.IsDefined(typeof(InstructionCondition), condition)); Contract.Requires <ArgumentException>(condition != InstructionCondition.None); #endregion this.offset = offset; this.condition = condition; }
/// <summary> /// Initializes a new instance of the <see cref="Set"/> class. /// </summary> /// <param name="destination">The destination operand.</param> /// <param name="condition">The condition on which this instruction executes.</param> private Set(Operand destination, InstructionCondition condition) { #region Contract Contract.Requires <ArgumentNullException>(destination != null); Contract.Requires <InvalidCastException>( destination is EffectiveAddress || destination is RegisterOperand); Contract.Requires <InvalidEnumArgumentException>(Enum.IsDefined(typeof(InstructionCondition), condition)); Contract.Requires <ArgumentException>(condition != InstructionCondition.None); #endregion this.destination = destination; this.condition = condition; }
/// <summary> /// Initializes a new instance of the <see cref="Set"/> class. /// </summary> /// <param name="destination">The destination operand.</param> /// <param name="condition">The condition on which this instruction executes.</param> private Set(Operand destination, InstructionCondition condition) { #region Contract Contract.Requires<ArgumentNullException>(destination != null); Contract.Requires<InvalidCastException>( destination is EffectiveAddress || destination is RegisterOperand); Contract.Requires<InvalidEnumArgumentException>(Enum.IsDefined(typeof(InstructionCondition), condition)); Contract.Requires<ArgumentException>(condition != InstructionCondition.None); #endregion this.destination = destination; this.condition = condition; }
/// <summary> /// Initializes a new instance of the <see cref="Set"/> class. /// </summary> /// <param name="destination">The destination memory operand.</param> /// <param name="condition">The condition on which this instruction executes.</param> public Set(EffectiveAddress destination, InstructionCondition condition) : this((Operand)destination, condition) { #region Contract Contract.Requires<ArgumentNullException>(destination != null); Contract.Requires<InvalidEnumArgumentException>(Enum.IsDefined(typeof(InstructionCondition), condition)); Contract.Requires<ArgumentException>(condition != InstructionCondition.None); #endregion }
/// <summary> /// Initializes a new instance of the <see cref="J"/> class. /// </summary> /// <param name="offset">The jump offset.</param> /// <param name="condition">The condition on which this instruction executes.</param> public J(RelativeOffset offset, InstructionCondition condition) { #region Contract Contract.Requires<ArgumentNullException>(offset != null); Contract.Requires<InvalidEnumArgumentException>(Enum.IsDefined(typeof(InstructionCondition), condition)); Contract.Requires<ArgumentException>(condition != InstructionCondition.None); #endregion this.offset = offset; this.condition = condition; }
/// <summary> /// Initializes a new instance of the <see cref="Cmov"/> class. /// </summary> /// <param name="destination">The destination register.</param> /// <param name="source">The source memory operand.</param> /// <param name="condition">The condition on which this instruction executes.</param> public Cmov(RegisterOperand destination, EffectiveAddress source, InstructionCondition condition) : this(destination, (Operand)source, condition) { #region Contract Contract.Requires<ArgumentNullException>(destination != null); Contract.Requires<ArgumentNullException>(source != null); Contract.Requires<InvalidEnumArgumentException>(Enum.IsDefined(typeof(InstructionCondition), condition)); Contract.Requires<ArgumentException>(condition != InstructionCondition.None); #endregion }