public ECS(IHeater heater, ITemp temp, IWindow window, int upperTemperatureThreshold, int lowerTemperatureThreshold) { _heater = heater; _temp = temp; _window = window; UpperTemperatureThreshold = upperTemperatureThreshold; LowerTemperatureThreshold = lowerTemperatureThreshold; }
public Form1() { InitializeComponent(); Bootstrapper.SetupContainer(container); IUnityContainer childcontainer = container.CreateChildContainer(); Bootstrapper.SetupContainer(childcontainer); t1 = childcontainer.Resolve<ITemp>(); t2 = childcontainer.Resolve<ITemp>(); }
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]); }
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; }
public Form1(ITemp tamp) { this._temp = tamp; }
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; }
public SubMenuComponent(ITemp temp) { _temp = temp; }
public BannerComponent(ITemp temp) { _temp = temp; }
public SliderComponent(ITemp temp) { _temp = temp; }
public TemplateScope(ITemp temp) { _temp = temp; }
public static ITemp MyAwesomeExtension(this ITemp temp) { return temp; }
public SiteLayoutScope(ITemp temp) { _temp = temp; }
public HomeController(ITemp temp) { _temp = temp; }
public Manager(ITemp temp) { _temp = temp; }