public ECS(IHeater heater, ITemp temp, IWindow window, int upperTemperatureThreshold, int lowerTemperatureThreshold)
        {
            _heater = heater;
            _temp   = temp;
            _window = window;

            UpperTemperatureThreshold = upperTemperatureThreshold;
            LowerTemperatureThreshold = lowerTemperatureThreshold;
        }
Exemple #2
0
 public Form1()
 {
     InitializeComponent();
     Bootstrapper.SetupContainer(container);
     IUnityContainer childcontainer = container.CreateChildContainer();
     Bootstrapper.SetupContainer(childcontainer);
     t1 = childcontainer.Resolve<ITemp>();
     t2 = childcontainer.Resolve<ITemp>();
 }
Exemple #3
0
        private static void RunMethod(ITemp t)
        {
            var m = t.Age;

            t.Name = "Waleed";
            t.Print(t.Name);
            Console.WriteLine("Add    " + t.Add(20, 10));
            Console.WriteLine("AddAsync" + t.AddAsync(100, 200).Result);
            t.PrintAsync("Waleed").Wait();
            t.Add(1, 2, out var x);
            Console.WriteLine("Add with out " + x);
            t.Write(20.887);
            Console.WriteLine(t.ToString());
            Console.WriteLine(t.GetHashCode());
            t[4] = 7;
            Console.WriteLine(t[4]);
        }
Exemple #4
0
        public static int Main(string[] args)
        {
            string value = "".PadRightC(10, 'F')
                .PadRightC(10, 'F')
                .PadRightC(10, 'F');

            IServiceCollection services = null;
            services.AddSingleton<Temp>();
            services.AddSingletonMany<ITemp, Temp>(1);
            services.AddSpecialSingleton<Temp>();
            services.AddSpecialSingleton2<Temp>(1);

            ServiceCollection serviceColection = null;
            serviceColection.AddSingleton<Temp>();
            serviceColection.AddSingletonMany<ITemp, Temp>(1);
            serviceColection.AddSpecialSingleton<Temp>();
            serviceColection.AddSpecialSingleton2<Temp>(1);

            MyServiceCollection myServiceColection = null;
            myServiceColection.AddSingleton<Temp>();
            myServiceColection.AddSingletonMany<ITemp, Temp>(1);
            myServiceColection.AddSpecialSingleton<Temp>();
            myServiceColection.AddSpecialSingleton2<Temp>(1);

            MyOtherServiceCollection myOtherServiceColection = null;
            myOtherServiceColection.AddSingleton<Temp>();
            myOtherServiceColection.AddSingletonMany<ITemp, Temp>(1);
            myOtherServiceColection.AddSpecialSingleton<Temp>();
            myOtherServiceColection.AddSpecialSingleton2<Temp>(1);

            context.Context.Context.Context.Context.Services.GetService<int>();
            object value2 = context.Context.Services.GetService(typeof(int));
            context.Context.Services.GetService(typeof(int));

            int i = Resolve().GetService<int>().Add(1);
            ITemp temp = Resolve().GetService<Temp>().MyAwesomeExtension();
            ITemp temp2 = Resolve().GetT3<int, bool, Temp>()
                .MyAwesomeExtension()
                .MyAwesomeExtension();
          
            0.IsNumber(MyNumbers.One);
            1.IsNumber2(MyConstantNumbers.ConstantOne);
            1.IsNumber2(MyConstantNumbers.ConstantTwo);

            return 0.Increment();
        }
 public HomeController(ITemp itemp)
 {
     _itemp = itemp;
 }
 public MainMenuCompunent(ITemp itemp)
 {
     _itemp = itemp;
 }
Exemple #7
0
 public Form1(ITemp tamp)
 {
     this._temp = tamp;
 }
Exemple #8
0
 public ECS(int thr, ITemp temp, IHeater heater)
 {
     SetThreshold(thr);
     _heater     = heater;
     _tempSensor = temp;
 }
 public MenuByIdComponent(ITemp temp)
 {
     _temp = temp;
 }
 public DownloadFileComponent(ITemp itemp)
 {
     _itemp = itemp;
 }
Exemple #11
0
 public SubMenuComponent(ITemp temp)
 {
     _temp = temp;
 }
Exemple #12
0
 public BannerComponent(ITemp temp)
 {
     _temp = temp;
 }
Exemple #13
0
 public SliderComponent(ITemp temp)
 {
     _temp = temp;
 }
Exemple #14
0
 public TemplateScope(ITemp temp)
 {
     _temp = temp;
 }
Exemple #15
0
 public static ITemp MyAwesomeExtension(this ITemp temp)
 {
     return temp;
 }
Exemple #16
0
 public SiteLayoutScope(ITemp temp)
 {
     _temp = temp;
 }
Exemple #17
0
 public HomeController(ITemp temp)
 {
     _temp = temp;
 }
Exemple #18
0
 public Manager(ITemp temp)
 {
     _temp = temp;
 }