Ejemplo n.º 1
0
 public DelayInfoViewModel(IDelayInfo <TBy> delayInfo) :
     this(delayInfo.ByData, new StationViewModel(delayInfo.Station), new TrainViewModel(delayInfo.Train),
          delayInfo.Date, delayInfo.From, delayInfo.Destination,
          delayInfo.PlannedArrival, delayInfo.ArrivalDelay,
          delayInfo.PlannedDeparture, delayInfo.DepartureDelay)
 {
 }
Ejemplo n.º 2
0
        private static void StartExecutable(IDelayInfo delayedStartup)
        {
            var filePath         = delayedStartup.StartInfo.FilePath;
            var arguments        = delayedStartup.StartInfo.Arguments;
            var processStartInfo = new ProcessStartInfo(filePath, arguments);

            Process.Start(processStartInfo);
        }
Ejemplo n.º 3
0
 public bool Equals(IDelayInfo <TBy> other)
 {
     return(Equals((IDelayInfoBase)other));
 }
Ejemplo n.º 4
0
 public int CompareTo(IDelayInfo <TBy> other)
 {
     return(CompareTo((IDelayInfoBase)other));
 }
Ejemplo n.º 5
0
    public NonNullState(TypeSystem t, IDelayInfo ieinfo) {
      this.typeSystem = t;
      this.egraph = new EGraph(Lattice.It);
      this.currentException = null;
      existDelayInfo = ieinfo;

      // materialize the null symbol early on so 
      // all derived states share it.
      ISymValue nullsym = this.Null;
    }
Ejemplo n.º 6
0
        /// <summary>
        /// Put general analysis targeting to general IL properties.
        /// </summary>
        /// <param name="method"></param>
        protected void GeneralAnalysis(Method method)
        {
            nonNullInfo = null;

            if (!this.CodeIsWellFormed)
            {
                return;
            }

            if (debug)
            {
                ControlFlowGraph cfg = GetCFG(method);
                if (cfg != null)
                {
                    cfg.Display(Console.Out);
                }
            }

            if (!method.Name.Name.StartsWith("Microsoft.Contracts"))
            {
                // Definite assignment checking

                //System.Console.WriteLine("--------------- Analyzing Method: {0}", method.Name);


                if (this.DefiniteAssignmentChecking)
                {
                    // For every statement, three things are returned from this pre- stage analysis
                    // 1) which program vars (that represent NN arrays) are created but not committed
                    // 2) which program vars (that represent NN arrays) are created and committed between
                    //    the creation and commitment of current array.
                    // 3) if the statement is a commitment call for an NN array, whether it
                    //    is ok to lift the array to be non-delayed.
                    PreDAStatus preAnalysisResult = MethodReachingDefNNArrayChecker.Check(typeSystem, method, this);
                    if (preAnalysisResult != null)
                    {
                        delayInfo = MethodDefiniteAssignmentChecker.Check(typeSystem, method, this, preAnalysisResult);
                    }
                }
                if (Analyzer.Debug)
                {
                    if (delayInfo != null)
                    {
                        System.Console.WriteLine("----- delay info count: {0}", delayInfo.Count());
                    }
                }

                if (this.ExposureChecking)
                {
                    ExposureChecker.Check(typeSystem, method, this);
                }

                // NonNull checking
                if (this.NonNullChecking)
                {
                    nonNullInfo = NonNullChecker.Check(typeSystem, method, this);
                }

                //System.Console.WriteLine("---------------- Finished Analyzing Method:{0}", method.Name);
            }
        }