Example #1
0
        public void Initialize()
        {
            var container = ContainerConfig.Configure();

            using (var scope = container.BeginLifetimeScope())
            {
                dataapi = scope.Resolve <Idatafromapi>();
            }
        }
Example #2
0
 /// <summary>
 /// this the constructor of this object, it will create instance of the other classes
 /// whenever needed (_disp is the display class whenever we need to write anything in the console
 /// _calc for calculation whenever we need to make caluclation (consumable duration or number of stops)
 /// and _dataapi for bringing data from api)
 /// </summary>
 /// <param name="calc">it is the class calculation which is related to calculation</param>
 /// <param name="disp">the class specialized in displaying info</param>
 /// <param name="dataapi">class related to manipulating data from api</param>
 public businesslogic(Icalculations calc, Idisplay disp, Idatafromapi dataapi)
 {
     _calc    = calc;
     _disp    = disp;
     _dataapi = dataapi;
 }