Click here to Skip to main content
15,892,927 members
Everything / Dependency

Dependency

dependency

Great Reads

by Fiyaz Hasan
Learn how dependency injection mechanism has evolved from ASP.NET to ASP.NET Core
by Habibur Rony
This will cover how to use Domain Driven Design in your application according to the Onion Architecture. There are short descriptions about architecture Category / Style, N-Layer / N-Tier Architecture, Template Method Pattern and Facade Design Pattern.
by GProssliner
cobj is a preprocessor based generator for interface based polymorphism
by Hein Pauwelyn
This is an application made for Windows (Universal) 10 devices made with MVVM, IoC-containers and dependency injection. There is also an API from Yahoo and SQLite service.

Latest Articles

by Matteo Prosperi
Being an engineer on the AWS SDK for .NET team, I tasked myself with figuring out how to use our libraries under Blazor in the browser.
by Chinmaya C
Explanation about DIP and its need in the real time scenario
by L. Michael
This article provides a recipe on how to avoid producing legacy code at the speed of typing by using a proper architecture and unit testing.
by Sharp Ninja
Simple Dependency Injection, the customizable way. Learn about the SimpleDI framework for creating simple and effective dependency injection.

All Articles

Sort by Updated

Dependency 

2 Apr 2015 by 9000605667
I have a class A with 3 methods M1,M2,M3.Class B is inherited from Class A & Class C is inherited from Class B.Now all the methods in Class A are accessible for Class B & Class C.Now i want to restrict 1)M1 & M2 of Class A for Class B2)M3 for Class C .How can i do this.
27 Feb 2014 by Aditya Magotra
Hi,Can anybody please let me know how to register interface using Castle.Winsdor in Application_Start Event of Global.asax & then how to access the registered interface on the web.page.If there is another appropriate approach please let me know.Any help will be highly...
28 Feb 2014 by Aditya Magotra
Hi Maciej,I implemented it in below fashion. Can you please let me know whether i implemented properly :Register Windsor Container in Global.asax :- -----------------------------------------------------private static WindsorContainer _container = null; /// ...
10 May 2015 by AhmedYehiaK
I ask about if i can do something like that://In classlib1.dllclass Context : IdentityDbContext { .............}//In classlib2.dllclass MyUser : IdentityUser{ extend IdentityUser.......}Dependency injection registration:=> When you find...
9 Oct 2012 by akchandra9
what are the advantages of Dependency Property. where it is used in wpf? sample code?
9 Oct 2012 by akchandra9
Each WPF control registers a set of DependencyProperties to the static DependencyProperty class. Each of them consists of a key - that must be unique per type - and a metadata that contain callbacks and a default value. All types that want to use DependencyProperties must derive from...
10 Aug 2016 by Aless Alessio
Design your solution and code your classes as loosely-coupled objects. Learn how to use MOQ and Ninject for mocking your Service and injecting it at runtime with Ninject.
15 Sep 2015 by Alex(Lei) Chi
Guys, I am looking for a service deploy tool with scheduler configuration and dependency for a while.I remember it should be WIX(Windows Installer Xml) - four years ago memory.it should support:Remoting deployment managementSchedule TaskService dependency configurationactually,...
22 Sep 2016 by Alexandros Pappas
This project provides utilities for SQL server, such as executing a list of SQL scripts, exporting data to an SQL script, and displaying relationships between records.
23 Oct 2013 by Ali_100
I need some opinion, if I am using user control & aspx page, & i have the requirement to use aspx page's label depend on some condition of usercontrol.but page_load event of aspx page is fired first , then user control's page_load event fired, so how do you able to update the label of aspx...
9 Jan 2013 by Allgaeuer
Hello everyone,i experienced the following very strange behavior/difference in Visual Studio 2003 and 2010:Two seperate projects will be created in VS2003. One of them is build as a MFC extension DLL (named MFC_Extension_DLL) and the other one is build as a MFC DLL (named MFC_USINGDLL)....
10 Jan 2013 by Allgaeuer
Ok, i found the solution.See the following links:Visual Studio 2010 not autolinking static libraries from projects that are dependencies as it should be supposed to[^]What does the “Link Library Dependency” linker option actually do in Visual Studio 2010?[^]
14 Mar 2013 by Andreas Gieriet
How about Dependency Injection?The interface is defined in a LibAContract and a LibBContract or even in a shared LibContract.LibA and LibB depend both on that contract lib and implement the respective contract.CheersAndi
14 Dec 2013 by Andreas Gieriet
What is your expectation on DI?DI does not magically extend functionality.DI allows to pass dependencies explicitly from outside instead of implicitly instanciating the dependencies.If you add in your Samurai class some new dependency, you have to provide means to pass them (DI) to the...
11 Mar 2016 by Anil Ghildiyal
Hello all, I am using sql dependency to get notifications from sql server, also using signalR for sending notifications to all active clients. I have already achieved the results as expected but now I need to use a complex select query instead of a simple statement.What I have...
2 Dec 2009 by ASP.NET Community
Observer pattern
1 Mar 2015 by Bankey Sharma
Some general guidelines to make application source agnostic and business adaptive
25 Sep 2012 by Bernhard Hiller
You can add dependencies via the registry or via the command line. See e.g. http://www.kiwisyslog.com/help/cattools/index.html?appserv_howtoaddservdepends.htm[^]
14 Aug 2013 by Bernhard Hiller
To reduce coupling, extract interfaces from the classes (some version of Visual Studio can do that), and use the interfaces in the parent class.Nowadays, Dependency Injection is a common way to get the child objects into the parent class, typically via the constructor (in its signature, you'll...
14 Dec 2013 by BillWoodruff
If you are going to extend a Class to use another instance of another interface, then ... yes ... you will need to change the Class: if you didn't how would the Class ever "know" about, or be able to use, the added interface ?However an option would be extend some larger-scope entity that...
12 Jun 2015 by Charaf Dadoua
SQL dependency with C#.NET and SQL Server 2012
28 Apr 2020 by Chinmaya C
Explanation about DIP and its need in the real time scenario
1 Dec 2015 by Chris Copeland
Hi all,I'm trying to enable command-line processing within a Java application to automate certain events whenever command-line arguments as passed into the application.There are two applications which are executing, management and reports. The idea is to allow the management software to...
23 Jan 2014 by Christian Graus
By writing code, and designing things so that they are modular. That means creating a framework that accepts plugins that impliment a base class, and extending that base class to create plug ins.
19 Nov 2012 by chuckdawit
Hi everyone,Would this considered to be object dependency?SomeMethod(SerializationInfo info){ this.SomeInterfaceIHaveDeclaredAbove = (SomeConcreteObject)info.GetValue("someName", typeof(SomeConcreteObject));}If so should I make the concrete objects as interfaces like...
21 Nov 2012 by chuckdawit
Reading through: http://lostechies.com/wp-content/uploads/2011/03/pablos_solid_ebook.pdfand reading the chapter on DIP (dependency inversion principal, the first example by Jimmy Bogard, is slightly confusing.in his example he takes a class that has two dependencies in the method he...
14 Dec 2015 by Ciumac Sergiu
A simple way of using dependency injection and service locator in you class library
10 Oct 2012 by Clifford Nelson
This is from http://stackoverflow.com/questions/2505234/need-a-short-and-clear-definition-for-dependency-properties[^]:A DependencyProperty is a property whose value depends (or can depend) on some other source (such as animation, data binding, styles, or visual tree inheritance). A regular...
9 Nov 2018 by dada2010
Hello everybody i have problems with some code : I try to cache some value from a config file in the global.asax, with a timer. The global goal of the project is to check some data and push messages for all webusers (via SignalR) every 20s. i add dependency on a file, but when updating this...
25 Apr 2013 by danait25
Hi,I used this tool as Kenneth Haugland recommended me:WPF-Drawing-Canvas-Controland I have a problem that I guess is pretty simple..On the class DrawingCanvas there's a custom control #Region "Constructor" Sub New() ...
28 Apr 2013 by danait25
deleted that part from my constructor and it worked fine- 'defaultStyleKeyProperty.OverrideMetadata(GetType(DrawingCanvas), _ 'New FrameworkPropertyMetadata(GetType(DrawingCanvas)))
6 Aug 2014 by DannyVarod
Fast, stable and powerful creation of NuGet packages
17 Jan 2013 by devdev13
Please see the code below. I am trying to create a drop down by using EF database first approach, and implementing Ninject for DI. I'm new to these concepts, and I don't know what I'm doing wrong. Any help would be greatly appreciated - thanks.**Below is my Error:**Cannot implicitly...
1 Dec 2015 by E.F. Nijboer
You need to drain the output streams to prevent hanging. Check the links for some detailed info. http://www.rgagnon.com/javadetails/java-0014.html[^]http://steveliles.github.io/invoking_processes_from_java.html[^]Good luck!
17 Nov 2015 by Emmanuel Nuyttens
Example of a multi purpose Layered framework for simplifying modern .NET application development
28 Dec 2016 by Fiyaz Hasan
Learn how dependency injection mechanism has evolved from ASP.NET to ASP.NET Core
17 Apr 2017 by Gary Harpaz
Dependency injection frameworks are bad practice. So how can we still use dependency injection? Just do it yourself!
3 Dec 2015 by Gaurav K Rastogi
This is the article which basically is the comparison between three most popular DIs in .NET.
7 Jun 2016 by GProssliner
cobj is a preprocessor based generator for interface based polymorphism
22 Nov 2017 by Graeme_Grant
This is an alternative for "Simplest WPF Dependency Property For Beginners On Background Color"
10 Jan 2013 by H.Brydon
I'm not following the story quite 100% but it sounds to me that you have something mixed up in the __declspec(dllimport) and __declspec(dllexport) symbols. Make sure that you have these and the macro symbols using them set up correctly.
24 Apr 2017 by Habibur Rony
This topic will cover the bad design practice using STUPID and good design practice using SOLID. Detailed explanation for Single Single Responsibility Principle, Open and Closed Principle, Liskov Substitution Principle, Interface Segregation Principle and Dependency Inversion (DI) Principle.
5 May 2017 by Habibur Rony
This will cover how to use Domain Driven Design in your application according to the Onion Architecture. There are short descriptions about architecture Category / Style, N-Layer / N-Tier Architecture, Template Method Pattern and Facade Design Pattern.
6 May 2017 by Habibur Rony
This topic will cover the concept of the adapter pattern & how to implement logger using log4net. It will also cover what’s adapter pattern, why need, where & when to use; what’s Log4Net, implementation of logger using adapter pattern, how to implement and add custom SMTP appender & configuration.
8 May 2014 by Halil ibrahim Kalkan
An implementation of dependency injection, repository and unit of work patterns using Castle Windsor and NHibernate.
14 Dec 2013 by HarisJayadev
Hi Friends, Hope all doing well. I'm new to dependency injection. i got a doubt while reading about Ninject. In Ninject wiki i saw an basic example for Dependency Injection. From that my doubt arises.This is the link....
29 Jul 2016 by Hein Pauwelyn
This is an application made for Windows (Universal) 10 devices made with MVVM, IoC-containers and dependency injection. There is also an API from Yahoo and SQLite service.
7 Jul 2018 by hiimda95
I have problem when I build project WindowsForm application Dependency Injection. Here this is my code in Program.cs file. var builder = new ContainerBuilder(); builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly()); // Register your Web API controllers....
7 Jul 2018 by hiimda95
I fixed that. I made a mistake when I create UnitOfWork file. constructor of it must be create public.
30 Jul 2017 by HoangMinh Nguyen
This is an alternative for "SOLID architecture principles using simple C# examples"
20 Jan 2013 by Jameel VM
Please update your viewModel like belowpublic class MyViewModel { public string SelectedCityId { get; set; } public IEnumerable Cities { get; set; } }Hope this helps
23 Jan 2014 by javad_r_85
i want create modular application in asp mvc 4 like joomla cms and i want use area for moduls and create new solution for Each moduls where each moduls is 3layer (service layer- domin classe - Model) . I user Code first.how implement it?
13 Jan 2014 by Jeremy Likness
Learn how to perform interception of services using Angular's decorator feature.
22 Jun 2012 by jgauffin
Griffin.Container: Introducing the Command Support
3 Sep 2012 by jim lahey
Hello everyone,I'm using PostSharp to implement logging and security aspects in my application. PostSharp uses attributes to decorate methods with aspects which are then modified at compile time. Does anyone know of a way that I can use dependency injection with these aspects? I'm...
14 Aug 2013 by JoCodes
Hi ,Needed a best way to load the dependent instances which is related with the parent instance creation .For ex : Class A , have to navigation properties or depended on B and C classes.So for when we create an instance of Class A we should be loaded with the dependent...
19 Mar 2014 by Justin Shepertycki
I know this question has been asked multiple times, and I've gone through them all. Hopefully I didn't just miss something in the previous answers, but I'm stumped.My application was working fine yesterday, but today I booted it up and now none of my file references, including ViewModels or...
19 Mar 2014 by Justin Shepertycki
Finally found the culprit!!At my work, our desktops are hosted on a network share. I had brought two applications I was working on from home and dropped the application files temporarily on the desktop to make some quick minor changes. Turns out there is a bug in the WPF Designer where the...
25 Aug 2015 by K. Naveen. Bhat
The article shows how we can solve various technical problems easily with the help of delegates.
4 Oct 2012 by Karthik. A
I use Ninject for my personal projects and I find it to be good, as it has a lot of documentation. Lot of people are using it and so it's easier to find information and also best practices with respect to the usage of ninject. For instance, my website uses ninject for dependency injection and...
8 Mar 2023 by Khushboo Dewani
what is the code for add data in redis database using hash datatype of redis in C# asp.net core 3.1?Also what is the concept of master key in it? I have to analyse the code for add in api and rewrite the code for add so that my data should be...
3 Oct 2013 by kpkaran88
I created windows service using C# I want to do some process depending the table valuesSo i used sql notification to do the process.With reference of this linkhttp://msdn.microsoft.com/en-us/library/a52dhwx7%28v=vs.80%29.aspxIf we didn't use the service long time it will go to...
26 Feb 2019 by L. Michael
This article provides a recipe on how to avoid producing legacy code at the speed of typing by using a proper architecture and unit testing.
11 Jun 2015 by Lance Contreras
Create an easily resusable IconBlock (TextBlock that display's an icon)
25 Sep 2012 by M_Mogharrabi
Hi all,How can i add dependencies of a windows service by installshield?My winservice depend on the three following services, so they must run before the service starts:1. COMSysApp2. SENS3. MSDTCNote: I have used Installshield project to install my service and not windows...
1 Oct 2012 by M_Mogharrabi
I have solved it myself by adding the dependencies in ServiceComponent Wizard.
27 Feb 2014 by Maciej Los
Have a look here: Castle Windsor Tutorial in Asp.Net MVC[^]
13 Oct 2016 by MaDOnos
Adapter implemantation to mock DbContext easily
9 Oct 2023 by Maloda 2022
Using WildFly 29, I followed the quickstart guide for the EJB-Multi-Server at the wildfly quickstart github Let' s supposes I have two EJB projects A and B I am already able to call B from A via a JNDI lookup But when I setup B to be able to...
21 Aug 2014 by Manoj Kumar Choubey
Dear all I would like to make application with the combination of web api controllers and mvc controllers both I installed following nuget packages1. unity.mvc43. unity.webapi4. webapiand I want to impliment dependency injection but I am having problem with dependency...
4 Sep 2012 by Martijn Kok
In a book I recently read about dependency injection (Dependency Injection in .NET by Mark Seemann [^]) there is a chapter (chapter 9) that might interest you. The chapter is about interception. Dynamic interception is discussed and compared with using the decorator pattern and using attributes...
13 Mar 2023 by Masis Levin
Redis with .NET | Redis Documentation Center[^]
26 Oct 2020 by Matteo Prosperi
Being an engineer on the AWS SDK for .NET team, I tasked myself with figuring out how to use our libraries under Blazor in the browser.
23 Oct 2016 by Matthew So (Hong Kong)
A task processing server with RDLC Implementation and extensible to customized handlers
19 Dec 2012 by Mawy
Binding binding = new Binding(); binding.Source = this; binding.Path = new PropertyPath("ActualInterior"); element.SetBinding(Shape.FillProperty, binding); binding = new Binding(); binding.Source = this; binding.Path =...
29 Feb 2016 by mayooran99
I have a library project which is built in maven. It has its dependencies. I need to export this project as a jar (Not a runnable jar). Should I include the dependencies along with my jar or should I not? Because when I exported the dependencies with my jar, there were conflicts when the same...
15 Jun 2023 by Member 13992703
I'm currently struggling with the following issue: I need to use an interface in my plugin (PLUGIN A) that comes from another plugin (PLUGIN B). I'm also the developer on PLUGIN B so I can make code changes (if needed). What I've done so far: ...
14 Jul 2021 by Member 14192879
I want to create a pdf of the current xamarin form. I used pdf sharp and itext7 to implement it but unable to do it. but below code only capture the text of xamarin, not the image. i just want to save currently viewed xamarin form to pdf. I am...
10 May 2021 by Member 15076657
I'm trying to run an .exe. When it runs, it shows the following error. Error occurred during initialization of VM Unable to load native library: Can't find dependent libraries What does this mean? JNIEnv* create_vm(JavaVM** jvm) { //JavaVM*...
14 Jul 2023 by Member 16050394
I have updated jackson dependency version in my maven project from 2.7.4 to 2.15.0 due to vulnerabilities in older versions. After updating I am getting an exception NoClassDefFoundError. I tried to use jackson BOM 2.15.0 but still getting that...
5 Mar 2013 by mostakeal
I have two related tables (tbVehicles and tbVehiclesDoc) I am running the below sql dependency but it is firring many time and my program freezes. please assist.I want the program to update these tables when another user modifies them. my CodePublic Sub getdata() Try If...
5 Mar 2013 by Mycroft Holmes
You are creating an infinite loop, in your get data you use the event dependancy change and then change the data, when you change the data dependancy change event fires and you start again.
20 Oct 2014 by Nathan Minier
The primary issue with your code sample is the calling of the MainForm from your Main thread. After dusting off my constructor injection knowledge (I don't use it terribly much) it looks like you do have a good constructor injection model in place. if (Settings.GlobalSettings.LoginSuccess...
3 Sep 2013 by Nitin Singh India
How to identify dependencies and resolve them using Unity App Block. Simple Hello World.
9 Nov 2015 by Oetawan
Extend ASP.NET MVC behavior to auto wire controller dependency
9 May 2021 by OriginalGriff
If you don't understand an error message, Google it: Error occurred during initialization of VM Unable to load native library: Can't find dependent libraries - Google Search[^] What it means is that a DLL is missing, or incompatible with the...
10 Oct 2023 by OriginalGriff
If you have two projects called A and B, and A references B while B also references A which do you build first? If you build A, then B you end up with A being out of date because B has changed. But when you build A, B becomes out of date so...
14 Mar 2013 by Patrick Skelton
Hi,I have an interesting C# conundrum, which I can't think of a neat solution for ... or any solution.I have two libraries - call them LibA and LibB. There must be no dependency between these libraries (i.e. a client application must be able to use either of these libraries without the...
15 Jan 2014 by Pete O'Hanlon
What you are talking about is software versioning, and it's part of a very big topic - release management. Whole books can be written about this area.So, the big question is, are there any simplistic ways of achieving this? The answer is yes, but it requires you to put quite a bit of...
14 Jan 2015 by Pheonyx
Hi Guys,This may be a silly question, but I've been trying to improve my knowledge on Dependency Injection and am re-working an existing (fairly simple) project to utilise my new knowledge.However, I have the following question and I'm not certain what the correct approach is.I have...
23 Nov 2023 by PinkGoat_
I'm having some issues here. So I wrote this method in a class named MainWindow, that exports logs of an app to a txt. Honestly I dont know if its good but anyways we will see. public void exportLogs () { string logsFolder =...
7 Feb 2014 by Pranay Rana
What is dependency injection and why there is need of this software design pattern.
21 Mar 2015 by Priyank Modi
In Depth Look: Strategy Design Pattern, Dependency Injection (DI), Open/Closed principle (OCP) and Loose Coupling vs Tight Coupling
28 Dec 2015 by Purbasha Ghosh
Initialize MVC controllers with multiple instance resolutions of same interface
8 Feb 2017 by Rasik Bihari Tiwari
Let's understand exactly what is Dependency Inversion principle and what it is not. How people confuse it to be dependency injection which is it NOT.
8 Jan 2023 by reverser69
hi all i have a target app written in Java. i want to call one of its functions. im using Intellij Idea. i imported its dependencies. wrote a few lines of code and till now, i have two problems. 1. i get: Exception in thread "main"...
21 Apr 2020 by Richard Deeming
That runtime language pack can be downloaded from: Download .NET Framework 4.7.2 - PTB Language Pack[^] There's a list of available language packs under "Advanced downloads" on this page: Download .NET Framework 4.7.2 | Free official downloads[^]
15 Sep 2015 by Richard MacCutchan
Please read Code Project Quick Answers FAQ[^].