Example #1
0
        public Sensors1Wire(TextWriter textWriter, ISQLWriter sqlWriter, IRequester requester)
        {
            this.TextWriter = textWriter;
            this.SQLWriter  = sqlWriter;
            this.Requester  = requester;

            Dict = new Dictionary <string, int>();
            var index = File.ReadAllLines(@"Resources\indexofallsensors.txt");

            Sensors = new SensorsTemp[index.Length];
            for (var i = 0; i < index.Length; i++)
            {
                var tempString = index[i].Split("\t");
                var sensorsId  = int.Parse(tempString[0]) - 1;
                Sensors[sensorsId] = new SensorsTemp(i + 1, tempString[1], tempString[2]);
                Dict.Add(tempString[1], sensorsId);
            }
        }
 public override string Write(ISQLWriter wr)
 {
     return(wr.Write(this));
 }
Example #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="adp"></param>
 /// <returns></returns>
 public override string Write(ISQLWriter adp)
 {
     return(adp.Write(this));
 }
 /// <summary>
 /// Append an "and" condition. Pass the settings for a SQCondition
 /// </summary>
 /// <param name="operandA"></param>
 /// <param name="op"></param>
 /// <param name="operandB"></param>
 /// <returns>The current condition</returns>
 public SQConditionBase And(ISQLWriter operandA, SQRelationOperators op, ISQLWriter operandB, bool invert)
 {
     return(And(new SQCondition(operandA, op, operandB, invert)));
 }
 /// <summary>
 /// Append an "and" condition. Pass the settings for a SQCondition
 /// </summary>
 /// <param name="operandA"></param>
 /// <param name="op"></param>
 /// <param name="operandB"></param>
 /// <returns>The current condition</returns>
 public SQConditionBase And(ISQLWriter operandA, SQRelationOperators op, ISQLWriter operandB)
 {
     return(And(operandA, op, operandB, false));
 }
 public abstract string Write(ISQLWriter adp);
Example #7
0
 public string Write(ISQLWriter wr)
 {
     return(wr.Write(this));
 }
 public string Write(ISQLWriter wr)
 {
     return(SQL);
 }