Example #1
0
 public Born(Born operations)
 {
     this.refBorn = operations.refBorn;
     foreach (var operation in operations.operations)
     {
         this.operations.Add(operation);
     }
 }
Example #2
0
 public Born(Born operations)
 {
     this.refBorn = operations.refBorn;
     foreach (var operation in operations.operations)
     {
         this.operations.Add(operation);
     }
 }
Example #3
0
        public void AddBorn(string born, string typeOperation, DateTime dateOperation)
        {
            if (lastBorn.Equals(born) && (dateOperation - lastTime).TotalMinutes < 60 && (dateOperation - lastTime).TotalMinutes > 0)
            {
                Anomalie anomalie;
                if (anomalies.TryGetValue(born, out anomalie))
                {
                    anomalie.AddAnomalie(dateOperation);
                }
                else
                {
                    anomalies.Add(born, new Anomalie(born, dateOperation));
                }
            }
            lastBorn = born;
            lastTime = dateOperation;
            Born result = borns.Find(delegate(Born b)
            {
                return(b.RefBorn == born);
            }
                                     );

            if (result != null)
            {
                result.AddOperation(dateOperation, typeOperation);
            }
            else
            {
                this.borns.Add(new Born(born, new Operation(dateOperation, typeOperation)));
            }

            /*
             * foreach (var b in borns)
             * {
             * if (b.RefBorn.Equals(born))
             * {
             *  b.AddOperation(dateOperation, typeOperation);
             *  return;
             * }
             * }
             *
             * this.borns.Add(new Born(born,new Operation(dateOperation, typeOperation)));*/
        }