コード例 #1
0
        /// <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());
        }
コード例 #2
0
ファイル: Set.cs プロジェクト: furesoft/CSharpAssembler
 /// <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
 }
コード例 #3
0
ファイル: Cmov.cs プロジェクト: furesoft/CSharpAssembler
 /// <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
 }
コード例 #4
0
        /// <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);
        }
コード例 #5
0
        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));
        }
コード例 #6
0
        /// <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;
        }
コード例 #7
0
ファイル: Set.cs プロジェクト: furesoft/CSharpAssembler
        /// <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;
        }
コード例 #8
0
ファイル: Set.cs プロジェクト: Konctantin/CSharpAssembler
        /// <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;
        }
コード例 #9
0
ファイル: Set.cs プロジェクト: Konctantin/CSharpAssembler
 /// <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
 }
コード例 #10
0
ファイル: J.cs プロジェクト: Konctantin/CSharpAssembler
        /// <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;
        }
コード例 #11
0
ファイル: Cmov.cs プロジェクト: Konctantin/SharpAssembler
 /// <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
 }