├── Repositorey Design Pattern ├── RepositoryUsingEFinMVC │ ├── RepositoryUsingEFinMVC │ │ ├── Views │ │ │ ├── _ViewStart.cshtml │ │ │ ├── Home │ │ │ │ ├── About.cshtml │ │ │ │ └── Contact.cshtml │ │ │ ├── Shared │ │ │ │ └── Error.cshtml │ │ │ ├── EmpsUsingUnitOfWork │ │ │ │ └── Details.cshtml │ │ │ ├── EmpsWithoutRepository │ │ │ │ └── Details.cshtml │ │ │ ├── EmpsUsingGenericRepository │ │ │ │ └── Details.cshtml │ │ │ ├── EmpsUsingNonGenericRepository │ │ │ │ └── Details.cshtml │ │ │ └── EmpsBothGenericAndNonGenericRepository │ │ │ │ └── Details.cshtml │ │ ├── Global.asax │ │ ├── favicon.ico │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── App_Start │ │ │ ├── FilterConfig.cs │ │ │ └── RouteConfig.cs │ │ ├── Migrations │ │ │ ├── 202104030932003_f.cs │ │ │ ├── 202104030932003_f.Designer.cs │ │ │ └── Configuration.cs │ │ ├── 1-RepositoryDP │ │ │ ├── 4-UnitofWorkWithGenericRepository │ │ │ │ ├── UnitOfWork │ │ │ │ │ └── 1-IUnitOfWork.cs │ │ │ │ ├── NonGeneric │ │ │ │ │ ├── 1-IEmployeeRepository.cs │ │ │ │ │ └── 2-EmployeeRepositorycs.cs │ │ │ │ └── Generic │ │ │ │ │ └── 1-IGenericRepository.cs │ │ │ ├── 3-BothGenericAndNonGenericRepository │ │ │ │ ├── NonGeneric │ │ │ │ │ ├── 1-IEmployeeRepository.cs │ │ │ │ │ └── 2-EmployeeRepositorycs.cs │ │ │ │ └── Generic │ │ │ │ │ └── 1-IGenericRepository.cs │ │ │ ├── 2-GenericRepositoryDP │ │ │ │ └── 1-IGenericRepository.cs │ │ │ ├── 1-NonGenericRepositoryDP │ │ │ │ └── 1-IEmployeeRepository.cs │ │ │ ├── Employee.cs │ │ │ └── EmployeeDBContext.cs │ │ ├── Content │ │ │ └── Site.css │ │ ├── Global.asax.cs │ │ └── 2-Controllers │ │ │ └── HomeController.cs │ └── RepositoryUsingEFinMVC.sln ├── Slides │ ├── 0.1-intro.PNG │ ├── 0.2-intro.PNG │ ├── 2.1- Generic Repository Pattern.PNG │ ├── 2.2- Generic Repository Pattern.PNG │ ├── 2.3- Generic Repository Pattern.PNG │ ├── 1.1- Non-Generic Repository Pattern.PNG │ ├── 1.2- Non-Generic Repository Pattern.PNG │ ├── 4.1-UnitOfWork With Repository Pattern.PNG │ ├── 4.2-UnitOfWork With Repository Pattern.PNG │ ├── 4.3-UnitOfWork With Repository Pattern.PNG │ ├── 3.1- Both Generic and Non-Generic Repository.PNG │ └── 3.2- Both Generic and Non-Generic Repository.PNG └── Database Script.txt ├── Behavioral Design Patterns ├── Slides │ ├── 0-Intro │ │ ├── 1.1.PNG │ │ └── 1.2.PNG │ ├── 04-State DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ └── 1.5.PNG │ ├── 06-Command DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ └── 1.5.PNG │ ├── 07-Visitor DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ ├── 1.5.PNG │ │ └── 1.6.PNG │ ├── 11-Memento DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ └── 1.4.PNG │ ├── 01-Iterator DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ ├── 1.5.PNG │ │ └── 1.6.PNG │ ├── 02-Observer DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.4.PNG │ │ ├── 1.5.PNG │ │ ├── 1.6.PNG │ │ └── 1.7.PNG │ ├── 08-Strategy DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ └── 1.5.PNG │ ├── 10-Mediator DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ ├── 1.5.PNG │ │ └── 1.6.PNG │ ├── 09-Interpreter DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ └── 1.4.PNG │ ├── 05-Template Method DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ └── 1.5.PNG │ └── 03-Chain of Responsibility DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ └── 1.5.PNG └── BehavioralDesignPatterns │ ├── BehavioralDesignPatterns │ ├── 01-IteratorDP │ │ ├── UsingList │ │ │ ├── 3-IAggregate.cs │ │ │ ├── 1-IIterator.cs │ │ │ ├── 4-ConcreteAggregate.cs │ │ │ └── 2-ConcreteIterator.cs │ │ ├── UsingArrayList │ │ │ ├── 3-IAggregate.cs │ │ │ ├── 1-IIterator.cs │ │ │ ├── 4-ConcreteAggregate.cs │ │ │ └── 2-ConcreteIterator.cs │ │ └── Student.cs │ ├── BehavioralDesignPatterns.csproj │ ├── 02-ObserverDP │ │ ├── 3-IObserver.cs │ │ ├── Helper.cs │ │ ├── 1-ISubjectcs.cs │ │ └── 4-Observer.cs │ ├── 06-CommandDP │ │ ├── 1-Command │ │ │ └── ICommand.cs │ │ ├── 3-Receiver │ │ │ └── SwitchOptions.cs │ │ ├── 4-Invoker │ │ │ └── LightRemoteControle.cs │ │ └── 2-ConcreteCommand │ │ │ ├── CloseSwitchCommand.cs │ │ │ └── OpenSwitchCommand.cs │ ├── 07-VisitorDP │ │ ├── 1-Visitor │ │ │ └── IVisitor.cs │ │ ├── 3-Element │ │ │ └── IElement.cs │ │ ├── 2-ConcreteVisitor │ │ │ ├── VacationVisitor.cs │ │ │ └── SalaryVisitor.cs │ │ ├── 4-ConcreteElement │ │ │ └── Employee.cs │ │ └── 5-ObjectStructure │ │ │ └── Company.cs │ ├── 09-InterpreterDP │ │ ├── 2-Expression │ │ │ └── Expression.cs │ │ ├── 1-Context │ │ │ └── Context.cs │ │ └── 3-TerminalExpressions │ │ │ ├── TensExpression.cs │ │ │ ├── UnitsExpression.cs │ │ │ └── ElevenToNineteenExpression.cs │ ├── 08-StrategyDP │ │ ├── 1-StrategyInterface │ │ │ └── ICompression.cs │ │ ├── 2-Strategies │ │ │ ├── RAR.cs │ │ │ └── ZIP.cs │ │ └── 3-Context │ │ │ └── CompressionContext.cs │ ├── 10-MediatorDP │ │ ├── 1-Mediator │ │ │ └── IChatroom.cs │ │ ├── 3-Colleague │ │ │ └── Participant.cs │ │ ├── 4-ConcreteColleagues │ │ │ └── ConcreteParticipant.cs │ │ └── 2-ConcreteMediator │ │ │ └── Chatroom.cs │ ├── 03-ChainOfResponsibility │ │ ├── 1-Handler │ │ │ └── Handler.cs │ │ ├── 2-ConcreteHandlers │ │ │ ├── HundredHandler.cs │ │ │ ├── FiveHundredHandlercs.cs │ │ │ ├── TwoHundredHandler.cs │ │ │ └── TwoThousandHandler.cs │ │ └── 3-Client │ │ │ └── ATM.cs │ ├── 11-MementoDP │ │ ├── Caretaker.cs │ │ ├── Originator.cs │ │ └── Memento.cs │ ├── 05-TemplateMethodDP │ │ ├── HouseTemplate.cs │ │ ├── WoodenHouse.cs │ │ └── ConcreteHouse.cs │ └── 04-StateDP │ │ ├── 1-State │ │ └── State.cs │ │ └── 2-ConcreteStates │ │ └── RedState .cs │ └── BehavioralDesignPatterns.sln ├── Creational Design Patterns ├── Slides │ ├── 0-Intro │ │ ├── 0.1.PNG │ │ └── 0.2.PNG │ ├── 1-Factory DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ ├── 1.5.PNG │ │ ├── 1.6.PNG │ │ ├── 1.7.PNG │ │ └── 1.8.PNG │ ├── 4-Builder DP │ │ ├── 1.1.PNG │ │ ├── 1.10.PNG │ │ ├── 1.11.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ ├── 1.5.PNG │ │ ├── 1.6.PNG │ │ ├── 1.7.PNG │ │ ├── 1.8.PNG │ │ └── 1.9.PNG │ ├── 6-Prototype DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ └── 1.4.PNG │ ├── 7-Singleton DP │ │ ├── 1.0.PNG │ │ ├── 0.1-intro.PNG │ │ ├── 0.2-intro.PNG │ │ ├── 0.3-intro.PNG │ │ ├── 0.4-intro.PNG │ │ ├── 0.5-intro.PNG │ │ ├── 1.1-NoThreadSafe.PNG │ │ ├── 1.2-NoThreadSafe.PNG │ │ ├── 1.3-NoThreadSafe.PNG │ │ ├── 1.4-NoThreadSafe.PNG │ │ ├── 2.1-ThreadSafeUsingLock.PNG │ │ ├── 2.3-ThreadSafeDoubleChecked.PNG │ │ ├── 3.1-ThreadSafeUsingEagerLoading.PNG │ │ ├── 3.2-ThreadSafeUsingEagerLoading.PNG │ │ ├── 4.1-ThreadSafeUsing LazyKeyword.PNG │ │ ├── 4.2-ThreadSafeUsing LazyKeyword.PNG │ │ ├── 5.1- Singleton vs Static class in C#.PNG │ │ ├── 5.2- Singleton vs Static class in C#.PNG │ │ └── 5.3- Singleton vs Static class in C#.PNG │ ├── 2-Factory Method DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ ├── 1.5.PNG │ │ ├── 1.6.PNG │ │ ├── 1.7.PNG │ │ └── 1.8.PNG │ ├── 3-Abstract Factory DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ ├── 1.5.PNG │ │ ├── 1.6.PNG │ │ └── 1.7.PNG │ ├── 5-Fluent Interface DP │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ ├── 1.5.PNG │ │ └── 1.6.PNG │ └── 6-Shallow Copy and Deep Copy in C# │ │ ├── 1.1.PNG │ │ ├── 1.2.PNG │ │ ├── 1.3.PNG │ │ ├── 1.4.PNG │ │ └── 1.5.PNG └── CreationalDesignPatterns │ ├── CreationalDesignPatterns │ ├── 3-AbstractFactoryDP │ │ ├── 1-Products │ │ │ ├── Shirt │ │ │ │ ├── IShirt.cs │ │ │ │ ├── NikeShirt.cs │ │ │ │ └── NikeTrousers.cs │ │ │ └── Trousers │ │ │ │ ├── ITrousers.cs │ │ │ │ ├── AdidasShirt.cs │ │ │ │ └── AdidasTrousers.cs │ │ ├── 2-Factories │ │ │ ├── IClothesFactory.cs │ │ │ ├── NikeClothesFactory.cs │ │ │ └── AdidasCLothesFactory.cs │ │ └── Client │ │ │ └── Client.cs │ ├── 7-SingletonDP │ │ ├── ISingletoneObj.cs │ │ ├── 1-NoThreadSafe │ │ │ └── NoThreadSafe.cs │ │ ├── 3-ThreadSafeUsingEagerLoadingAndLazyKeyword │ │ │ ├── 1-ThreadSafeUsingEagerLoading.cs │ │ │ └── 2-ThreadSafeUsingLazyKeyword.cs │ │ └── 2-ThreadSafeInUsingLock │ │ │ └── 1-ThreadSafe.cs │ ├── 2-FactoryMethodDP │ │ ├── FactoryMethod │ │ │ ├── 1-ICreditCardFactory.cs │ │ │ ├── 3-PlatinumFactory.cs │ │ │ ├── 4-TitaniumFactory.cs │ │ │ ├── 2-MoneyBackFactory.cs │ │ │ └── FactoryDPWithFactoryMethodDP │ │ │ │ └── 5-CreditCardFactory.cs │ │ ├── 0-ExampleNeeds │ │ │ ├── ICreditCard.cs │ │ │ ├── Platinum.cs │ │ │ ├── Titanium.cs │ │ │ └── MoneyBack.cs │ │ └── ClientUseFactoryDPWithFactoryMethod.cs │ ├── 1-FactoryDP │ │ ├── 0-ExampleNeeds │ │ │ ├── ICreditCard.cs │ │ │ ├── Platinum.cs │ │ │ ├── Titanium.cs │ │ │ └── MoneyBack.cs │ │ ├── 2- WithFactoryDP │ │ │ ├── 1-CreditCardFactory.cs │ │ │ └── ClientApplyFactoryDB.cs │ │ └── 1-WithoutFactoryDP │ │ │ └── ClientDontApplyFactoryDB.cs │ ├── CreationalDesignPatterns.csproj │ ├── 6-PrototypeDP │ │ └── Student.cs │ ├── 4-BuilderDP │ │ ├── 2-ReportBuilder.cs │ │ ├── 4-ReportDirector.cs │ │ ├── 1-Report.cs │ │ └── 3-ConcreteBuilder │ │ │ ├── PDFReportBuilder.cs │ │ │ └── ExcelReportBuilder.cs │ └── 5-FluentInterfaceDP │ │ ├── Employee.cs │ │ └── FluentEmployee.cs │ └── CreationalDesignPatterns.sln ├── Dependency Injection Pattern ├── Slides │ ├── 0.1-Intro.PNG │ ├── 0.2-Intro.PNG │ ├── 0.3-Intro.PNG │ ├── 0.4-Intro4.PNG │ ├── 3.1-Method Dependency Injection.PNG │ ├── 3.2-Method Dependency Injection.PNG │ ├── 3.3-Method Dependency Injection.PNG │ ├── 3.4-Method Dependency Injection.PNG │ ├── 2.1-Property Dependency Injection.PNG │ ├── 2.2-Property Dependency Injection.PNG │ ├── 2.3-Property Dependency Injection.PNG │ ├── 2.4-Property Dependency Injection.PNG │ ├── 2.5-Property Dependency Injection.PNG │ ├── 1.1-Constructor Dependency Injection.PNG │ ├── 1.2-Constructor Dependency Injection.PNG │ ├── 1.3-Constructor Dependency Injection.PNG │ ├── 4.1-Dependency Injection using Unity Container in MVC.PNG │ ├── 4.2-Dependency Injection using Unity Container in MVC.PNG │ ├── 4.3-Dependency Injection using Unity Container in MVC.PNG │ ├── 4.4-Dependency Injection using Unity Container in MVC.PNG │ ├── 4.5-Dependency Injection using Unity Container in MVC.PNG │ └── 4.6-Dependency Injection using Unity Container in MVC.PNG └── DependencyInjection │ ├── DependencyInjection │ ├── DependencyInjection.csproj │ ├── Employee.cs │ ├── 3-MethodDependencyInjection │ │ ├── 2-Client.cs │ │ ├── 3-Injector.cs │ │ └── 1-Service.cs │ ├── 1-ConstructorDependencyInjection │ │ ├── 2-Client.cs │ │ ├── 3-Injector.cs │ │ └── 1-Service.cs │ ├── Program.cs │ └── 2-PropertyDependencyInjection │ │ ├── 3-Injector.cs │ │ ├── 1-Service.cs │ │ └── 2-Client.cs │ └── DependencyInjection.sln └── Structural Design Patterns ├── Slides ├── 0-Intro │ ├── 0.1.PNG │ └── 0.2.PNG ├── 1-Adapter DP │ ├── 1.1.PNG │ ├── 1.2.PNG │ ├── 1.3.PNG │ ├── 1.4.PNG │ ├── 1.5.png │ ├── 1.6.png │ ├── 1.7.PNG │ ├── 1.8.PNG │ └── 1.9.PNG ├── 2-Facade DP │ ├── 1.1.PNG │ ├── 1.2.PNG │ ├── 1.3.PNG │ ├── 1.4.PNG │ ├── 1.5.PNG │ └── 1.6.PNG ├── 4-Bridge DP │ ├── 1.1.PNG │ ├── 1.2.PNG │ ├── 1.3.PNG │ ├── 1.4.PNG │ ├── 1.5.PNG │ └── 1.6.PNG ├── 3-Decorator DP │ ├── 1.1.PNG │ ├── 1.2.PNG │ ├── 1.3.PNG │ ├── 1.5.PNG │ ├── 1.6.PNG │ ├── 1.7.PNG │ └── 1.8.PNG ├── 5-Composite DP │ ├── 1.1.PNG │ ├── 1.2.PNG │ ├── 1.3.PNG │ ├── 1.4.PNG │ ├── 1.5.PNG │ └── 1.6.PNG ├── 7-Flyweight DP │ ├── 1.1.PNG │ ├── 1.10.PNG │ ├── 1.11.PNG │ ├── 1.12.PNG │ ├── 1.2.PNG │ ├── 1.3.PNG │ ├── 1.4.PNG │ ├── 1.5.PNG │ ├── 1.6.PNG │ ├── 1.7.PNG │ ├── 1.8.PNG │ └── 1.9.PNG └── 6-Proxy DP │ ├── 0.1-intro.PNG │ ├── 0.2-intro.PNG │ ├── 0.3-intro.PNG │ ├── 0.4-intro.PNG │ ├── 1.1-Virtual Proxy.PNG │ ├── 1.2-Virtual Proxy.PNG │ ├── 1.3-Virtual Proxy.PNG │ ├── 2.1-Protection Proxy.PNG │ ├── 2.2-Protection Proxy.PNG │ └── 2.3-Protection Proxy.PNG └── StructuralDesignPatterns ├── StructuralDesignPatterns ├── StructuralDesignPatterns.csproj ├── 6-ProxyDP │ ├── 1-VirtualProxy │ │ ├── 1-Subject.cs │ │ ├── 3-Proxy.cs │ │ └── 2-RealSubject.cs │ └── 2-ProtectionProxy │ │ ├── 1-Subject.cs │ │ ├── 2-RealSubject.cs │ │ ├── Person.cs │ │ └── 3-Proxy.cs ├── 7-FlyweightDP │ ├── Helper.cs │ ├── 1-Flyweight.cs │ └── 2-ConcreteFlyweight.cs ├── 4-BridgeDP │ ├── 1-Implementer │ │ └── IWorkshop.cs │ ├── 2-ConcreteImplementation │ │ ├── BMW_Workshop.cs │ │ └── Mercedes_WorkShop.cs │ ├── 3-Abstraction │ │ └── CarAbstraction.cs │ └── 4-ConcreteAbstraction │ │ └── Car_Workshop.cs ├── 3-DecoratorDP │ ├── 1-Component │ │ └── ICar.cs │ ├── ConcreteDecorator │ │ ├── BasicAccessoriesDecorator.cs │ │ └── SportAccessoriesDecorator.cs │ ├── 3-Decorator │ │ └── CarAccessoriesDecorator.cs │ └── 2-ConcreteComponent │ │ ├── BMW.cs │ │ └── Mercedes.cs ├── 1-AdapterDB │ ├── 1-ObjectAdapterDP │ │ ├── 2-ITarget.cs │ │ ├── 1-Adaptee.cs │ │ └── 4-Client.cs │ ├── 2-ClassAdapterDP │ │ ├── 2-ITarget.cs │ │ ├── 1-Adaptee.cs │ │ ├── 4-Client.cs │ │ └── 3-Adapter.cs │ └── Employee.cs ├── 5-CompositeDP │ ├── 1-IComponent.cs │ ├── 2-Leaf.cs │ └── 3-Composite.cs └── 2-FacadeDP │ ├── 2-SubsystemClasses │ ├── Invoice.cs │ ├── Payment.cs │ └── Product.cs │ └── 1-FacadeClass │ └── FacadeClass .cs └── StructuralDesignPatterns.sln /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/0.1-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/0.1-intro.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/0.2-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/0.2-intro.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/0-Intro/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/0-Intro/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/0-Intro/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/0-Intro/1.2.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/0-Intro/0.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/0-Intro/0.1.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/0-Intro/0.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/0-Intro/0.2.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/0.1-Intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/0.1-Intro.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/0.2-Intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/0.2-Intro.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/0.3-Intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/0.3-Intro.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/0.4-Intro4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/0.4-Intro4.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/0-Intro/0.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/0-Intro/0.1.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/0-Intro/0.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/0-Intro/0.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/04-State DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/04-State DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/04-State DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/04-State DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/04-State DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/04-State DP/1.3.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/04-State DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/04-State DP/1.5.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/06-Command DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/06-Command DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/06-Command DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/06-Command DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/06-Command DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/06-Command DP/1.3.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/06-Command DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/06-Command DP/1.4.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/06-Command DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/06-Command DP/1.5.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/07-Visitor DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/07-Visitor DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/07-Visitor DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/07-Visitor DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/07-Visitor DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/07-Visitor DP/1.3.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/07-Visitor DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/07-Visitor DP/1.4.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/07-Visitor DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/07-Visitor DP/1.5.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/07-Visitor DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/07-Visitor DP/1.6.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/11-Memento DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/11-Memento DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/11-Memento DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/11-Memento DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/11-Memento DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/11-Memento DP/1.3.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/11-Memento DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/11-Memento DP/1.4.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/1-Factory DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/1-Factory DP/1.1.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/1-Factory DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/1-Factory DP/1.2.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/1-Factory DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/1-Factory DP/1.3.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/1-Factory DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/1-Factory DP/1.4.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/1-Factory DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/1-Factory DP/1.5.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/1-Factory DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/1-Factory DP/1.6.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/1-Factory DP/1.7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/1-Factory DP/1.7.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/1-Factory DP/1.8.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/1-Factory DP/1.8.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.1.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.10.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.10.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.11.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.11.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.2.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.3.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.4.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.5.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.6.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.7.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.8.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.8.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/4-Builder DP/1.9.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/4-Builder DP/1.9.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/1-Adapter DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/1-Adapter DP/1.1.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/1-Adapter DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/1-Adapter DP/1.2.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/1-Adapter DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/1-Adapter DP/1.3.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/1-Adapter DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/1-Adapter DP/1.4.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/1-Adapter DP/1.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/1-Adapter DP/1.5.png -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/1-Adapter DP/1.6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/1-Adapter DP/1.6.png -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/1-Adapter DP/1.7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/1-Adapter DP/1.7.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/1-Adapter DP/1.8.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/1-Adapter DP/1.8.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/1-Adapter DP/1.9.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/1-Adapter DP/1.9.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/2-Facade DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/2-Facade DP/1.1.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/2-Facade DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/2-Facade DP/1.2.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/2-Facade DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/2-Facade DP/1.3.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/2-Facade DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/2-Facade DP/1.4.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/2-Facade DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/2-Facade DP/1.5.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/2-Facade DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/2-Facade DP/1.6.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/4-Bridge DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/4-Bridge DP/1.1.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/4-Bridge DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/4-Bridge DP/1.2.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/4-Bridge DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/4-Bridge DP/1.3.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/4-Bridge DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/4-Bridge DP/1.4.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/4-Bridge DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/4-Bridge DP/1.5.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/4-Bridge DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/4-Bridge DP/1.6.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/01-Iterator DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/01-Iterator DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/01-Iterator DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/01-Iterator DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/01-Iterator DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/01-Iterator DP/1.3.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/01-Iterator DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/01-Iterator DP/1.4.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/01-Iterator DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/01-Iterator DP/1.5.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/01-Iterator DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/01-Iterator DP/1.6.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/02-Observer DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/02-Observer DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/02-Observer DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/02-Observer DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/02-Observer DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/02-Observer DP/1.4.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/02-Observer DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/02-Observer DP/1.5.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/02-Observer DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/02-Observer DP/1.6.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/02-Observer DP/1.7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/02-Observer DP/1.7.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/08-Strategy DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/08-Strategy DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/08-Strategy DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/08-Strategy DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/08-Strategy DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/08-Strategy DP/1.3.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/08-Strategy DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/08-Strategy DP/1.4.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/08-Strategy DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/08-Strategy DP/1.5.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/10-Mediator DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/10-Mediator DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/10-Mediator DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/10-Mediator DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/10-Mediator DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/10-Mediator DP/1.3.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/10-Mediator DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/10-Mediator DP/1.4.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/10-Mediator DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/10-Mediator DP/1.5.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/10-Mediator DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/10-Mediator DP/1.6.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/6-Prototype DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/6-Prototype DP/1.1.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/6-Prototype DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/6-Prototype DP/1.2.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/6-Prototype DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/6-Prototype DP/1.3.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/6-Prototype DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/6-Prototype DP/1.4.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/1.0.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/1.0.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/3-Decorator DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/3-Decorator DP/1.1.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/3-Decorator DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/3-Decorator DP/1.2.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/3-Decorator DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/3-Decorator DP/1.3.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/3-Decorator DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/3-Decorator DP/1.5.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/3-Decorator DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/3-Decorator DP/1.6.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/3-Decorator DP/1.7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/3-Decorator DP/1.7.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/3-Decorator DP/1.8.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/3-Decorator DP/1.8.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/5-Composite DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/5-Composite DP/1.1.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/5-Composite DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/5-Composite DP/1.2.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/5-Composite DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/5-Composite DP/1.3.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/5-Composite DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/5-Composite DP/1.4.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/5-Composite DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/5-Composite DP/1.5.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/5-Composite DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/5-Composite DP/1.6.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.1.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.10.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.10.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.11.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.11.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.12.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.12.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.2.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.3.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.4.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.5.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.6.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.7.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.8.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.8.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/7-Flyweight DP/1.9.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/7-Flyweight DP/1.9.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/09-Interpreter DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/09-Interpreter DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/09-Interpreter DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/09-Interpreter DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/09-Interpreter DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/09-Interpreter DP/1.3.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/09-Interpreter DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/09-Interpreter DP/1.4.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/6-Proxy DP/0.1-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/6-Proxy DP/0.1-intro.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/6-Proxy DP/0.2-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/6-Proxy DP/0.2-intro.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/6-Proxy DP/0.3-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/6-Proxy DP/0.3-intro.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/6-Proxy DP/0.4-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/6-Proxy DP/0.4-intro.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/2-Factory Method DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/2-Factory Method DP/1.1.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/2-Factory Method DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/2-Factory Method DP/1.2.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/2-Factory Method DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/2-Factory Method DP/1.3.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/2-Factory Method DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/2-Factory Method DP/1.4.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/2-Factory Method DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/2-Factory Method DP/1.5.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/2-Factory Method DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/2-Factory Method DP/1.6.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/2-Factory Method DP/1.7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/2-Factory Method DP/1.7.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/2-Factory Method DP/1.8.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/2-Factory Method DP/1.8.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/0.1-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/0.1-intro.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/0.2-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/0.2-intro.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/0.3-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/0.3-intro.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/0.4-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/0.4-intro.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/0.5-intro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/0.5-intro.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/05-Template Method DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/05-Template Method DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/05-Template Method DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/05-Template Method DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/05-Template Method DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/05-Template Method DP/1.3.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/05-Template Method DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/05-Template Method DP/1.4.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/05-Template Method DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/05-Template Method DP/1.5.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/3-Abstract Factory DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/3-Abstract Factory DP/1.1.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/3-Abstract Factory DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/3-Abstract Factory DP/1.2.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/3-Abstract Factory DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/3-Abstract Factory DP/1.3.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/3-Abstract Factory DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/3-Abstract Factory DP/1.4.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/3-Abstract Factory DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/3-Abstract Factory DP/1.5.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/3-Abstract Factory DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/3-Abstract Factory DP/1.6.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/3-Abstract Factory DP/1.7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/3-Abstract Factory DP/1.7.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/5-Fluent Interface DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/5-Fluent Interface DP/1.1.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/5-Fluent Interface DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/5-Fluent Interface DP/1.2.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/5-Fluent Interface DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/5-Fluent Interface DP/1.3.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/5-Fluent Interface DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/5-Fluent Interface DP/1.4.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/5-Fluent Interface DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/5-Fluent Interface DP/1.5.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/5-Fluent Interface DP/1.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/5-Fluent Interface DP/1.6.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="RepositoryUsingEFinMVC.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/6-Proxy DP/1.1-Virtual Proxy.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/6-Proxy DP/1.1-Virtual Proxy.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/6-Proxy DP/1.2-Virtual Proxy.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/6-Proxy DP/1.2-Virtual Proxy.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/6-Proxy DP/1.3-Virtual Proxy.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/6-Proxy DP/1.3-Virtual Proxy.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/1.1-NoThreadSafe.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/1.1-NoThreadSafe.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/1.2-NoThreadSafe.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/1.2-NoThreadSafe.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/1.3-NoThreadSafe.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/1.3-NoThreadSafe.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/1.4-NoThreadSafe.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/1.4-NoThreadSafe.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/2.1- Generic Repository Pattern.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/2.1- Generic Repository Pattern.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/2.2- Generic Repository Pattern.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/2.2- Generic Repository Pattern.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/2.3- Generic Repository Pattern.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/2.3- Generic Repository Pattern.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/6-Proxy DP/2.1-Protection Proxy.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/6-Proxy DP/2.1-Protection Proxy.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/6-Proxy DP/2.2-Protection Proxy.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/6-Proxy DP/2.2-Protection Proxy.PNG -------------------------------------------------------------------------------- /Structural Design Patterns/Slides/6-Proxy DP/2.3-Protection Proxy.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Structural Design Patterns/Slides/6-Proxy DP/2.3-Protection Proxy.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/03-Chain of Responsibility DP/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/03-Chain of Responsibility DP/1.1.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/03-Chain of Responsibility DP/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/03-Chain of Responsibility DP/1.2.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/03-Chain of Responsibility DP/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/03-Chain of Responsibility DP/1.3.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/03-Chain of Responsibility DP/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/03-Chain of Responsibility DP/1.4.PNG -------------------------------------------------------------------------------- /Behavioral Design Patterns/Slides/03-Chain of Responsibility DP/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Behavioral Design Patterns/Slides/03-Chain of Responsibility DP/1.5.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/3.1-Method Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/3.1-Method Dependency Injection.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/3.2-Method Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/3.2-Method Dependency Injection.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/3.3-Method Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/3.3-Method Dependency Injection.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/3.4-Method Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/3.4-Method Dependency Injection.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/2.1-Property Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/2.1-Property Dependency Injection.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/2.2-Property Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/2.2-Property Dependency Injection.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/2.3-Property Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/2.3-Property Dependency Injection.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/2.4-Property Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/2.4-Property Dependency Injection.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/2.5-Property Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/2.5-Property Dependency Injection.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/1.1- Non-Generic Repository Pattern.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/1.1- Non-Generic Repository Pattern.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/1.2- Non-Generic Repository Pattern.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/1.2- Non-Generic Repository Pattern.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/6-Shallow Copy and Deep Copy in C#/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/6-Shallow Copy and Deep Copy in C#/1.1.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/6-Shallow Copy and Deep Copy in C#/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/6-Shallow Copy and Deep Copy in C#/1.2.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/6-Shallow Copy and Deep Copy in C#/1.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/6-Shallow Copy and Deep Copy in C#/1.3.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/6-Shallow Copy and Deep Copy in C#/1.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/6-Shallow Copy and Deep Copy in C#/1.4.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/6-Shallow Copy and Deep Copy in C#/1.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/6-Shallow Copy and Deep Copy in C#/1.5.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/2.1-ThreadSafeUsingLock.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/2.1-ThreadSafeUsingLock.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/1.1-Constructor Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/1.1-Constructor Dependency Injection.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/1.2-Constructor Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/1.2-Constructor Dependency Injection.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/1.3-Constructor Dependency Injection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/1.3-Constructor Dependency Injection.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/4.1-UnitOfWork With Repository Pattern.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/4.1-UnitOfWork With Repository Pattern.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/4.2-UnitOfWork With Repository Pattern.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/4.2-UnitOfWork With Repository Pattern.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/4.3-UnitOfWork With Repository Pattern.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/4.3-UnitOfWork With Repository Pattern.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/2.3-ThreadSafeDoubleChecked.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/2.3-ThreadSafeDoubleChecked.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/3.1- Both Generic and Non-Generic Repository.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/3.1- Both Generic and Non-Generic Repository.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/Slides/3.2- Both Generic and Non-Generic Repository.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/Slides/3.2- Both Generic and Non-Generic Repository.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/3.1-ThreadSafeUsingEagerLoading.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/3.1-ThreadSafeUsingEagerLoading.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/3.2-ThreadSafeUsingEagerLoading.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/3.2-ThreadSafeUsingEagerLoading.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/4.1-ThreadSafeUsing LazyKeyword.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/4.1-ThreadSafeUsing LazyKeyword.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/4.2-ThreadSafeUsing LazyKeyword.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/4.2-ThreadSafeUsing LazyKeyword.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/favicon.ico -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/5.1- Singleton vs Static class in C#.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/5.1- Singleton vs Static class in C#.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/5.2- Singleton vs Static class in C#.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/5.2- Singleton vs Static class in C#.PNG -------------------------------------------------------------------------------- /Creational Design Patterns/Slides/7-Singleton DP/5.3- Singleton vs Static class in C#.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Creational Design Patterns/Slides/7-Singleton DP/5.3- Singleton vs Static class in C#.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/4.1-Dependency Injection using Unity Container in MVC.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/4.1-Dependency Injection using Unity Container in MVC.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/4.2-Dependency Injection using Unity Container in MVC.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/4.2-Dependency Injection using Unity Container in MVC.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/4.3-Dependency Injection using Unity Container in MVC.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/4.3-Dependency Injection using Unity Container in MVC.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/4.4-Dependency Injection using Unity Container in MVC.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/4.4-Dependency Injection using Unity Container in MVC.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/4.5-Dependency Injection using Unity Container in MVC.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/4.5-Dependency Injection using Unity Container in MVC.PNG -------------------------------------------------------------------------------- /Dependency Injection Pattern/Slides/4.6-Dependency Injection using Unity Container in MVC.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Dependency Injection Pattern/Slides/4.6-Dependency Injection using Unity Container in MVC.PNG -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/01-IteratorDP/UsingList/3-IAggregate.cs: -------------------------------------------------------------------------------- 1 | namespace BehavioralDesignPatterns.IteratorDP.UsingList 2 | { 3 | interface IAggregate 4 | { 5 | Iterator CreateIterator(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/01-IteratorDP/UsingArrayList/3-IAggregate.cs: -------------------------------------------------------------------------------- 1 | namespace BehavioralDesignPatterns.IteratorDP.UsingArrayList 2 | { 3 | interface IAggregate 4 | { 5 | Iterator CreateIterator(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/DependencyInjection.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MohamedHashish42/Design_Patterns/HEAD/Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/BehavioralDesignPatterns.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/StructuralDesignPatterns.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/01-IteratorDP/UsingList/1-IIterator.cs: -------------------------------------------------------------------------------- 1 | namespace BehavioralDesignPatterns.IteratorDP.UsingList 2 | { 3 | interface IIterator 4 | { 5 | Student First(); 6 | Student Next(); 7 | bool HasNext(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/3-AbstractFactoryDP/1-Products/Shirt/IShirt.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.AbstractFactoryDP 6 | { 7 | interface IShirt 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/01-IteratorDP/UsingArrayList/1-IIterator.cs: -------------------------------------------------------------------------------- 1 | namespace BehavioralDesignPatterns.IteratorDP.UsingArrayList 2 | { 3 | interface IIterator 4 | { 5 | Student First(); 6 | Student Next(); 7 | bool HasNext(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/3-AbstractFactoryDP/1-Products/Trousers/ITrousers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.AbstractFactoryDP 6 | { 7 | interface ITrousers 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/6-ProxyDP/1-VirtualProxy/1-Subject.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace StructuralDesignPatterns.ProxyDP 7 | { 8 | public interface IImage 9 | { 10 | void display(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/02-ObserverDP/3-IObserver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.ObserverDP 6 | { 7 | public interface IObserver 8 | { 9 | void Update(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/02-ObserverDP/Helper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.ObserverDP 6 | { 7 | public enum state 8 | { 9 | NotAvailable = 0, 10 | Available = 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/06-CommandDP/1-Command/ICommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.CommandDP 6 | { 7 | public interface ICommand 8 | { 9 | void Execute(); 10 | } 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/07-VisitorDP/1-Visitor/IVisitor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.VisitorDP 6 | { 7 | public interface IVisitor 8 | { 9 | void Visit(Employee element); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/6-ProxyDP/2-ProtectionProxy/1-Subject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.ProxyDP 6 | { 7 | interface ISharedFolder 8 | { 9 | void PerformRWOperations(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/7-FlyweightDP/Helper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.FlyweightDP 6 | { 7 | public enum SharedShapesNames 8 | { 9 | circle = 1, 10 | triangle = 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/07-VisitorDP/3-Element/IElement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.VisitorDP 6 | { 7 | public interface IElement 8 | { 9 | public void Accept(IVisitor visitor); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/7-SingletonDP/ISingletoneObj.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.SingletonDP 6 | { 7 | interface ISingletonObj 8 | { 9 | public void PrintDetails(string message); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/7-FlyweightDP/1-Flyweight.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.FlyweightDP 6 | { 7 | 8 | 9 | public interface Shape 10 | { 11 | void Draw(ConsoleColor Color); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/4-BridgeDP/1-Implementer/IWorkshop.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.BridgeDP 6 | { 7 | interface IWorkshop 8 | { 9 | void Assemble(); 10 | void Produce(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/2-FactoryMethodDP/FactoryMethod/1-ICreditCardFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryMethodDP 6 | { 7 | interface ICreditCardFactory 8 | { 9 | ICreditCard MakeInstance(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/3-DecoratorDP/1-Component/ICar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.DecoratorDP 6 | { 7 | interface ICar 8 | { 9 | double GetCost(); 10 | string GetDescription(); 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/09-InterpreterDP/2-Expression/Expression.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.InterpreterDP 6 | { 7 | abstract class Expression 8 | { 9 | public abstract void Interpret(Context context); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/08-StrategyDP/1-StrategyInterface/ICompression.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace BehavioralDesignPatterns.StrategyDP 7 | { 8 | public interface ICompression 9 | { 10 | void Compress(string compressedArchiveFileName); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/1-AdapterDB/1-ObjectAdapterDP/2-ITarget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.AdapterDB.ObjectAdapterDP 6 | { 7 | public interface ITarget 8 | { 9 | void ProcessCompanySalary(string[][] employeesArray); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/1-AdapterDB/2-ClassAdapterDP/2-ITarget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.AdapterDB.ClassAdapterDP 6 | { 7 | public interface ITarget 8 | { 9 | void ProcessCompanySalary(string[][] employeesArray); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/Employee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DependencyInjection 6 | { 7 | public class Employee 8 | { 9 | public int ID { get; set; } 10 | public string Name { get; set; } 11 | public string Department { get; set; } 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/5-CompositeDP/1-IComponent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.CompositeDP 6 | { 7 | public interface IComponent 8 | { 9 | string GetName(); 10 | int GetPrice(); 11 | public void GetDetails(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Error 6 | 7 | 8 |
9 |

Error.

10 |

An error occurred while processing your request.

11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/1-FactoryDP/0-ExampleNeeds/ICreditCard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryDP 6 | { 7 | interface ICreditCard 8 | { 9 | string GetCardType(); 10 | int GetCreditLimit(); 11 | int GetAnnualCharge(); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/3-AbstractFactoryDP/2-Factories/IClothesFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.AbstractFactoryDP 6 | { 7 | interface IClothesFactory 8 | { 9 | public IShirt CreateShirt(); 10 | public ITrousers CreateTrousers(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace RepositoryUsingEFinMVC 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/10-MediatorDP/1-Mediator/IChatroom.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.MediatorDP 6 | { 7 | public interface IChatroom 8 | { 9 | void SendMessage(string msg, Participant participant); 10 | void RegisterUser(Participant participant); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/2-FactoryMethodDP/0-ExampleNeeds/ICreditCard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryMethodDP 6 | 7 | { 8 | interface ICreditCard 9 | { 10 | string GetCardType(); 11 | int GetCreditLimit(); 12 | int GetAnnualCharge(); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/3-AbstractFactoryDP/1-Products/Shirt/NikeShirt.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.AbstractFactoryDP 6 | { 7 | class NikeShirt : IShirt 8 | { 9 | public NikeShirt() 10 | { 11 | Console.WriteLine("Niki Shirt"); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/2-FacadeDP/2-SubsystemClasses/Invoice.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.FacadeDP 6 | { 7 | public class Invoice 8 | { 9 | public void Sendinvoice() 10 | { 11 | Console.WriteLine("Invoice Send Successfully"); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/2-FacadeDP/2-SubsystemClasses/Payment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.FacadeDP 6 | { 7 | public class Payment 8 | { 9 | public void MakePayment() 10 | { 11 | Console.WriteLine("Payment Done Successfully"); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/2-FacadeDP/2-SubsystemClasses/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.FacadeDP 6 | { 7 | public class Product 8 | { 9 | public void GetProductDetails() 10 | { 11 | Console.WriteLine("Fetching the Product Details"); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/3-AbstractFactoryDP/1-Products/Shirt/NikeTrousers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.AbstractFactoryDP 6 | { 7 | class NikeTrousers : ITrousers 8 | { 9 | public NikeTrousers() 10 | { 11 | Console.WriteLine("Niki Trousers"); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/3-AbstractFactoryDP/1-Products/Trousers/AdidasShirt.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.AbstractFactoryDP 6 | { 7 | class AdidasShirt : IShirt 8 | { 9 | public AdidasShirt() 10 | { 11 | Console.WriteLine("Adidas Shirt"); 12 | } 13 | } 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/3-AbstractFactoryDP/1-Products/Trousers/AdidasTrousers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.AbstractFactoryDP 6 | { 7 | class AdidasTrousers : ITrousers 8 | { 9 | public AdidasTrousers() 10 | { 11 | Console.WriteLine("Adidas Trousers"); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/CreationalDesignPatterns.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Migrations/202104030932003_f.cs: -------------------------------------------------------------------------------- 1 | namespace RepositoryUsingEFinMVC.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity.Migrations; 5 | 6 | public partial class f : DbMigration 7 | { 8 | public override void Up() 9 | { 10 | 11 | 12 | } 13 | 14 | public override void Down() 15 | { 16 | 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/01-IteratorDP/Student.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.IteratorDP 6 | { 7 | class Student 8 | { 9 | public int ID { get; set; } 10 | public string Name { get; set; } 11 | public Student(string name, int id) 12 | { 13 | ID = id; 14 | Name = name; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/6-ProxyDP/2-ProtectionProxy/2-RealSubject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.ProxyDP 6 | { 7 | class SharedFolder : ISharedFolder 8 | { 9 | public void PerformRWOperations() 10 | { 11 | Console.WriteLine 12 | ("Performing Read Write operation on the Shared Folder"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/2-FactoryMethodDP/FactoryMethod/3-PlatinumFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryMethodDP 6 | { 7 | class PlatinumFactory : ICreditCardFactory 8 | { 9 | public ICreditCard MakeInstance() 10 | { 11 | ICreditCard product = new Platinum(); 12 | return product; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/2-FactoryMethodDP/FactoryMethod/4-TitaniumFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryMethodDP 6 | { 7 | class TitaniumFactory : ICreditCardFactory 8 | { 9 | public ICreditCard MakeInstance() 10 | { 11 | ICreditCard product = new Titanium(); 12 | return product; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/6-PrototypeDP/Student.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.PrototypeDP 6 | { 7 | class Student 8 | { 9 | public string Name { get; set; } 10 | public string Department { get; set; } 11 | public Student GetClone() 12 | { 13 | return (Student)this.MemberwiseClone(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/2-FactoryMethodDP/FactoryMethod/2-MoneyBackFactory.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace CreationalDesignPatterns.FactoryMethodDP 7 | { 8 | class MoneyBackFactory : ICreditCardFactory 9 | { 10 | public ICreditCard MakeInstance() 11 | { 12 | ICreditCard product = new MoneyBack(); 13 | return product; 14 | } 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/2-FactoryMethodDP/FactoryMethod/FactoryDPWithFactoryMethodDP/5-CreditCardFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryMethodDP 6 | { 7 | class CreditCardFactory 8 | { 9 | public static ICreditCard GetCardInstance(ICreditCardFactory creditCard) 10 | { 11 | return creditCard.MakeInstance(); 12 | } 13 | } 14 | } 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/06-CommandDP/3-Receiver/SwitchOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.CommandDP 6 | { 7 | public class SwitchOptions 8 | { 9 | public void On() 10 | { 11 | Console.WriteLine("The light is on"); 12 | } 13 | 14 | public void Off() 15 | { 16 | Console.WriteLine("The light is off"); 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/4-BuilderDP/2-ReportBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.BuilderDP 6 | { 7 | abstract class ReportBuilder 8 | { 9 | public abstract void SetReportType(); 10 | public abstract void SetReportHeader(); 11 | public abstract void SetReportContent(); 12 | public abstract void SetReportFooter(); 13 | public abstract Report GetReport(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/03-ChainOfResponsibility/1-Handler/Handler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.ChainOfResponsibility 6 | { 7 | public abstract class Handler 8 | { 9 | public Handler nextHandler; 10 | public void NextHandler(Handler nextHandler) 11 | { 12 | this.nextHandler = nextHandler; 13 | } 14 | public abstract void Handle(long requestedAmount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/08-StrategyDP/2-Strategies/RAR.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.StrategyDP 6 | { 7 | public class RAR : ICompression 8 | { 9 | public void Compress(string compressedArchiveFileName) 10 | { 11 | Console.WriteLine("Folder is compressed using Rar approach: '" 12 | + compressedArchiveFileName + ".rar' file is created"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/08-StrategyDP/2-Strategies/ZIP.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.StrategyDP 6 | { 7 | public class ZIP : ICompression 8 | { 9 | public void Compress(string compressedArchiveFileName) 10 | { 11 | Console.WriteLine("Folder is compressed using zip approach: '" 12 | + compressedArchiveFileName + ".zip' file is created"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/3-AbstractFactoryDP/2-Factories/NikeClothesFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.AbstractFactoryDP 6 | { 7 | class NikeClothesFactory : IClothesFactory 8 | { 9 | public IShirt CreateShirt() 10 | { 11 | return new NikeShirt(); 12 | } 13 | 14 | public ITrousers CreateTrousers() 15 | { 16 | return new NikeTrousers(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/4-BuilderDP/4-ReportDirector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.BuilderDP 6 | { 7 | class ReportDirector 8 | { 9 | public void MakeReport(ReportBuilder reportBuilder) 10 | { 11 | reportBuilder.SetReportType(); 12 | reportBuilder.SetReportHeader(); 13 | reportBuilder.SetReportContent(); 14 | reportBuilder.SetReportFooter(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/02-ObserverDP/1-ISubjectcs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.ObserverDP 6 | { 7 | public interface ISubject 8 | { 9 | //To attach an observer to the subject. 10 | void Attach(IObserver observer); 11 | 12 | //To detach an observer from the subject 13 | void Detach(IObserver observer); 14 | 15 | //To notify all observers about an event. 16 | void Notify(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/3-AbstractFactoryDP/2-Factories/AdidasCLothesFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.AbstractFactoryDP 6 | { 7 | class AdidasCLothesFactory : IClothesFactory 8 | { 9 | public IShirt CreateShirt() 10 | { 11 | return new AdidasShirt(); 12 | } 13 | 14 | public ITrousers CreateTrousers() 15 | { 16 | return new AdidasTrousers(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/4-BridgeDP/2-ConcreteImplementation/BMW_Workshop.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.BridgeDP 6 | { 7 | class BMW_Workshop : IWorkshop 8 | { 9 | public void Produce() 10 | { 11 | Console.WriteLine("a New BMW car was produced "); 12 | } 13 | 14 | public void Assemble() 15 | { 16 | Console.WriteLine("the New BMW car was assembled"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/06-CommandDP/4-Invoker/LightRemoteControle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.CommandDP 6 | { 7 | 8 | public class LightRemoteControle 9 | { 10 | ICommand _command; 11 | 12 | public LightRemoteControle(ICommand command) 13 | { 14 | _command = command; 15 | } 16 | 17 | public void Execute() 18 | { 19 | _command.Execute(); 20 | } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/4-BridgeDP/3-Abstraction/CarAbstraction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.BridgeDP 6 | { 7 | abstract class CarAbstraction 8 | { 9 | protected IWorkshop Workshop; 10 | 11 | protected CarAbstraction(IWorkshop workshop) 12 | { 13 | Workshop = workshop; 14 | } 15 | 16 | abstract public void ProduceNewCar(); 17 | abstract public void AssembleNewCar(); 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/3-AbstractFactoryDP/Client/Client.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.AbstractFactoryDP 6 | { 7 | class Client 8 | { 9 | private readonly IShirt _shirt; 10 | private readonly ITrousers _trousers; 11 | 12 | public Client(IClothesFactory factory) 13 | { 14 | _shirt = factory.CreateShirt(); 15 | _trousers = factory.CreateTrousers(); 16 | } 17 | 18 | } 19 | } 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/4-UnitofWorkWithGenericRepository/UnitOfWork/1-IUnitOfWork.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace RepositoryUsingEFinMVC.UnitofWork 9 | { 10 | interface IUnitOfWork 11 | 12 | { 13 | IEmployeeRepository Employees { get; } 14 | void CreateTransaction(); 15 | void Commit(); 16 | void Rollback(); 17 | void Save(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/4-BridgeDP/2-ConcreteImplementation/Mercedes_WorkShop.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.BridgeDP 6 | { 7 | class Mercedes_WorkShop : IWorkshop 8 | { 9 | public void Produce() 10 | { 11 | Console.WriteLine("a New Mercedes car was produced "); 12 | } 13 | 14 | public void Assemble() 15 | { 16 | Console.WriteLine("the New Mercedes car was assembled"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/1-FactoryDP/0-ExampleNeeds/Platinum.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryDP 6 | { 7 | class Platinum :ICreditCard 8 | { 9 | public string GetCardType() 10 | { 11 | return "Platinum Plus"; 12 | } 13 | public int GetCreditLimit() 14 | { 15 | return 35000; 16 | } 17 | public int GetAnnualCharge() 18 | { 19 | return 2000; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/1-FactoryDP/0-ExampleNeeds/Titanium.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryDP 6 | { 7 | class Titanium : ICreditCard 8 | { 9 | public string GetCardType() 10 | { 11 | return "Titanium Edge"; 12 | } 13 | public int GetCreditLimit() 14 | { 15 | return 25000; 16 | } 17 | public int GetAnnualCharge() 18 | { 19 | return 1500; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/3-MethodDependencyInjection/2-Client.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DependencyInjection.MethodDependencyInjection 6 | { 7 | 8 | public class EmployeeBL 9 | { 10 | public IEmployeeDAL employeeDAL; 11 | 12 | public List GetAllEmployees(IEmployeeDAL _employeeDAL) 13 | { 14 | employeeDAL = _employeeDAL; 15 | 16 | return employeeDAL.GetAllEmployees(); 17 | } 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/4-UnitofWorkWithGenericRepository/NonGeneric/1-IEmployeeRepository.cs: -------------------------------------------------------------------------------- 1 | using RepositoryUsingEFinMVC.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace RepositoryUsingEFinMVC.UnitofWork 9 | { 10 | interface IEmployeeRepository : IGenericRepository 11 | { 12 | IEnumerable GetEmployeesByGender(string Gender); 13 | IEnumerable GetEmployeesByDepartment(string Dept); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/1-FactoryDP/0-ExampleNeeds/MoneyBack.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryDP 6 | { 7 | class MoneyBack : ICreditCard 8 | { 9 | public string GetCardType() 10 | { 11 | return "MoneyBack"; 12 | } 13 | public int GetCreditLimit() 14 | { 15 | return 15000; 16 | } 17 | public int GetAnnualCharge() 18 | { 19 | return 500; 20 | } 21 | } 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/2-FactoryMethodDP/0-ExampleNeeds/Platinum.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryMethodDP 6 | { 7 | class Platinum :ICreditCard 8 | { 9 | public string GetCardType() 10 | { 11 | return "Platinum Plus"; 12 | } 13 | public int GetCreditLimit() 14 | { 15 | return 35000; 16 | } 17 | public int GetAnnualCharge() 18 | { 19 | return 2000; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/2-FactoryMethodDP/0-ExampleNeeds/Titanium.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryMethodDP 6 | { 7 | class Titanium : ICreditCard 8 | { 9 | public string GetCardType() 10 | { 11 | return "Titanium Edge"; 12 | } 13 | public int GetCreditLimit() 14 | { 15 | return 25000; 16 | } 17 | public int GetAnnualCharge() 18 | { 19 | return 1500; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/02-ObserverDP/4-Observer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.ObserverDP 6 | { 7 | public class Observer : IObserver 8 | { 9 | public string UserName { get; set; } 10 | public Observer(string userName) 11 | { 12 | UserName = userName; 13 | } 14 | 15 | public void Update() 16 | { 17 | Console.WriteLine("Hallo " + UserName + ": " + "the product you want is availble "); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/06-CommandDP/2-ConcreteCommand/CloseSwitchCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.CommandDP 6 | { 7 | public class CloseSwitchCommand : ICommand 8 | { 9 | private SwitchOptions _switchOption; 10 | 11 | public CloseSwitchCommand(SwitchOptions switchOption) 12 | { 13 | _switchOption = switchOption; 14 | } 15 | 16 | public void Execute() 17 | { 18 | _switchOption.Off(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/2-FactoryMethodDP/0-ExampleNeeds/MoneyBack.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryMethodDP 6 | { 7 | class MoneyBack : ICreditCard 8 | { 9 | public string GetCardType() 10 | { 11 | return "MoneyBack"; 12 | } 13 | public int GetCreditLimit() 14 | { 15 | return 15000; 16 | } 17 | public int GetAnnualCharge() 18 | { 19 | return 500; 20 | } 21 | } 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/06-CommandDP/2-ConcreteCommand/OpenSwitchCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.CommandDP 6 | { 7 | public class OpenSwitchCommand : ICommand 8 | { 9 | private SwitchOptions _switchOption; 10 | 11 | public OpenSwitchCommand(SwitchOptions switchOption) 12 | { 13 | _switchOption = switchOption; 14 | } 15 | 16 | public void Execute() 17 | { 18 | _switchOption.On(); 19 | } 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/1-ConstructorDependencyInjection/2-Client.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace DependencyInjection.ConstructorDependencyInjection 7 | { 8 | public class EmployeeBL 9 | { 10 | public IEmployeeDAL employeeDAL; 11 | 12 | public EmployeeBL(IEmployeeDAL employeeDAL) 13 | { 14 | this.employeeDAL = employeeDAL; 15 | } 16 | 17 | public List GetAllEmployees() 18 | { 19 | return employeeDAL.GetAllEmployees(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/3-BothGenericAndNonGenericRepository/NonGeneric/1-IEmployeeRepository.cs: -------------------------------------------------------------------------------- 1 | using RepositoryUsingEFinMVC.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace RepositoryUsingEFinMVC.BothGenericAndNonGenericRepository 9 | { 10 | interface IEmployeeRepository : IGenericRepository 11 | { 12 | IEnumerable GetEmployeesByGender(string Gender); 13 | IEnumerable GetEmployeesByDepartment(string Dept); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/10-MediatorDP/3-Colleague/Participant.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.MediatorDP 6 | { 7 | public abstract class Participant 8 | { 9 | protected Chatroom mediator; 10 | protected string name; 11 | public Participant(Chatroom mediator, string name) 12 | { 13 | this.mediator = mediator; 14 | this.name = name; 15 | } 16 | public abstract void Send(string message); 17 | public abstract void Receive(string message); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/2-GenericRepositoryDP/1-IGenericRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace RepositoryUsingEFinMVC.GenericRepositoryDP 8 | { 9 | public interface IGenericRepository where TEntity : class 10 | { 11 | IEnumerable GetAll(); 12 | TEntity GetById(int? id); 13 | void Insert(TEntity obj); 14 | void Update(TEntity obj); 15 | void Delete(int id); 16 | void Dispose(); 17 | void Save(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/1-AdapterDB/2-ClassAdapterDP/1-Adaptee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.AdapterDB.ClassAdapterDP 6 | { 7 | class ThirdPartyBillingSystem 8 | { 9 | public void ProcessSalary(List listEmployee) 10 | { 11 | foreach (Employee employee in listEmployee) 12 | { 13 | Console.WriteLine("Rs.{0} Salary Credited to {1} ", 14 | employee.Salary, employee.Name); 15 | } 16 | } 17 | } 18 | } 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/4-UnitofWorkWithGenericRepository/Generic/1-IGenericRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace RepositoryUsingEFinMVC.UnitofWork 8 | { 9 | public interface IGenericRepository where TEntity : class 10 | { 11 | IEnumerable GetAll(); 12 | TEntity GetById(int? id); 13 | void Insert(TEntity obj); 14 | void Update(TEntity obj); 15 | void Delete(int id); 16 | void Dispose(); 17 | void Save(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/1-AdapterDB/1-ObjectAdapterDP/1-Adaptee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.AdapterDB.ObjectAdapterDP 6 | { 7 | class ThirdPartyBillingSystem 8 | { 9 | public void ProcessSalary(List listEmployee) 10 | { 11 | foreach (Employee employee in listEmployee) 12 | { 13 | Console.WriteLine("Rs.{0} Salary Credited to {1} ", 14 | employee.Salary, employee.Name); 15 | } 16 | } 17 | } 18 | } 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/4-BridgeDP/4-ConcreteAbstraction/Car_Workshop.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.BridgeDP 6 | { 7 | class Car_Workshop : CarAbstraction 8 | { 9 | 10 | public Car_Workshop(IWorkshop workshop) : base(workshop) 11 | { 12 | } 13 | 14 | public override void ProduceNewCar() 15 | { 16 | Workshop.Produce(); 17 | } 18 | 19 | public override void AssembleNewCar() 20 | { 21 | Workshop.Assemble(); 22 | } 23 | 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Override the default bootstrap behavior where horizontal description lists 13 | will truncate terms that are too long to fit in the left column 14 | */ 15 | .dl-horizontal dt { 16 | white-space: normal; 17 | } 18 | 19 | /* Set width on the form input elements since they're 100% wide by default */ 20 | input, 21 | select, 22 | textarea { 23 | max-width: 280px; 24 | } 25 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/3-BothGenericAndNonGenericRepository/Generic/1-IGenericRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace RepositoryUsingEFinMVC.BothGenericAndNonGenericRepository 8 | { 9 | public interface IGenericRepository where TEntity : class 10 | { 11 | IEnumerable GetAll(); 12 | TEntity GetById(int? id); 13 | void Insert(TEntity obj); 14 | void Update(TEntity obj); 15 | void Delete(int id); 16 | void Dispose(); 17 | void Save(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/1-AdapterDB/Employee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.AdapterDB 6 | { 7 | public class Employee 8 | { 9 | public int ID { get; set; } 10 | public string Name { get; set; } 11 | public string Designation { get; set; } 12 | public decimal Salary { get; set; } 13 | public Employee(int id, string name, string designation, decimal salary) 14 | { 15 | ID = id; 16 | Name = name; 17 | Designation = designation; 18 | Salary = salary; 19 | } 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/1-NonGenericRepositoryDP/1-IEmployeeRepository.cs: -------------------------------------------------------------------------------- 1 | using RepositoryUsingEFinMVC.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace RepositoryUsingEFinMVC.RepositoryDP.NonGenericRepositoryDP 9 | { 10 | interface IEmployeeRepository 11 | { 12 | IEnumerable GetAll(); 13 | Employee GetById(int? EmployeeID); 14 | void Insert(Employee employee); 15 | void Update(Employee employee); 16 | void Delete(int EmployeeID); 17 | 18 | void Dispose(); 19 | void Save(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Optimization; 7 | using System.Web.Routing; 8 | 9 | namespace RepositoryUsingEFinMVC 10 | { 11 | public class MvcApplication : System.Web.HttpApplication 12 | { 13 | protected void Application_Start() 14 | { 15 | AreaRegistration.RegisterAllAreas(); 16 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 17 | RouteConfig.RegisterRoutes(RouteTable.Routes); 18 | BundleConfig.RegisterBundles(BundleTable.Bundles); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/07-VisitorDP/2-ConcreteVisitor/VacationVisitor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.VisitorDP 6 | { 7 | class VacationVisitor : IVisitor 8 | { 9 | public int NumberOfDays { get; set; } 10 | public VacationVisitor(int numberOfDays) 11 | { 12 | NumberOfDays = numberOfDays; 13 | } 14 | public void Visit(Employee employee) 15 | { 16 | employee.Vacation += NumberOfDays; 17 | Console.WriteLine(employee.Name + " vacation after VacationVisitor Visiting is " + employee.Vacation); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/5-FluentInterfaceDP/Employee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.BuilderDP 6 | { 7 | class Employee 8 | { 9 | public string FullName { get; set; } 10 | public DateTime DateOfBirth { get; set; } 11 | public string Department { get; set; } 12 | public string Address { get; set; } 13 | 14 | public void print() 15 | { 16 | Console.WriteLine("Emp Data \nname : {0} \nBorn : {1} \nWorking on : {2}\nStays At : {3} " 17 | , this.FullName, this.DateOfBirth, this.Department, this.Address); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/3-DecoratorDP/ConcreteDecorator/BasicAccessoriesDecorator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.DecoratorDP 6 | { 7 | class BasicAccessoriesDecorator : CarAccessoriesDecorator 8 | { 9 | public BasicAccessoriesDecorator(ICar aCar) : base(aCar) 10 | { 11 | } 12 | 13 | public override string GetDescription() 14 | { 15 | return base.GetDescription() + " with basic accessories"; 16 | } 17 | 18 | public override double GetCost() 19 | { 20 | return base.GetCost() + 500; 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/3-DecoratorDP/ConcreteDecorator/SportAccessoriesDecorator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.DecoratorDP 6 | { 7 | class SportAccessoriesDecorator :CarAccessoriesDecorator 8 | { 9 | public SportAccessoriesDecorator (ICar car) :base(car) 10 | { 11 | 12 | } 13 | 14 | public override string GetDescription() 15 | { 16 | return base.GetDescription() + " with sport accessories"; 17 | } 18 | 19 | public override double GetCost() 20 | { 21 | return base.GetCost() + 1000; 22 | } 23 | 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/6-ProxyDP/1-VirtualProxy/3-Proxy.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace StructuralDesignPatterns.ProxyDP 7 | { 8 | public class ImageProxy : IImage 9 | { 10 | 11 | private RealImage realImage; 12 | 13 | private string fileName; 14 | public ImageProxy(string fileName) 15 | { 16 | this.fileName = fileName; 17 | } 18 | 19 | public void display() 20 | { 21 | if (realImage == null) 22 | { 23 | realImage = new RealImage(fileName); 24 | } 25 | realImage.display(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/6-ProxyDP/2-ProtectionProxy/Person.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.ProxyDP 6 | { 7 | public enum role 8 | { 9 | CEO = 1, 10 | MANAGER = 2, 11 | Developer = 3 12 | } 13 | public class Person 14 | { 15 | public string Username { get; set; } 16 | public string Password { get; set; } 17 | public role Role { get; set; } 18 | public Person(string username, string password, role role) 19 | { 20 | Username = username; 21 | Password = password; 22 | Role = role; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/07-VisitorDP/4-ConcreteElement/Employee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.VisitorDP 6 | { 7 | public class Employee : IElement 8 | { 9 | public string Name { get; set; } 10 | public float Salary { get; set; } 11 | public int Vacation { get; set; } 12 | 13 | public Employee(string name, float salary, int vacation) 14 | { 15 | Name = name; 16 | Salary = salary; 17 | Vacation = vacation; 18 | } 19 | public void Accept(IVisitor visitor) 20 | { 21 | visitor.Visit(this); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace RepositoryUsingEFinMVC 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/11-MementoDP/Caretaker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.MementoDP 6 | { 7 | public class Caretaker 8 | { 9 | private Dictionary Mementos = new Dictionary (); 10 | public void AddMemento(string StepName,Memento m) 11 | { 12 | Mementos[StepName]=m; 13 | //Console.WriteLine("User snapshots Maintained by CareTaker :" 14 | // + m.GetState().GetDetails()); 15 | } 16 | public Memento GetMemento(string StepName) 17 | { 18 | return Mementos[StepName] ; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/2-FacadeDP/1-FacadeClass/FacadeClass .cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.FacadeDP 6 | { 7 | public class Order 8 | { 9 | public void PlaceOrder() 10 | { 11 | Console.WriteLine("Place Order Started"); 12 | 13 | Product product = new Product(); 14 | product.GetProductDetails(); 15 | 16 | Payment payment = new Payment(); 17 | payment.MakePayment(); 18 | 19 | Invoice invoice = new Invoice(); 20 | invoice.Sendinvoice(); 21 | 22 | Console.WriteLine("Order Placed Successfully"); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/07-VisitorDP/2-ConcreteVisitor/SalaryVisitor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.VisitorDP 6 | { 7 | public class SalaryVisitor : IVisitor 8 | { 9 | public float Percentage { get; set; } 10 | 11 | public SalaryVisitor(float percentage) 12 | { 13 | Percentage = percentage; 14 | } 15 | 16 | 17 | public void Visit(Employee employee) 18 | { 19 | employee.Salary = employee.Salary + (employee.Salary * Percentage / 100); 20 | Console.WriteLine(employee.Name + " salary after SalaryVisitor visiting is " + employee.Salary); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/05-TemplateMethodDP/HouseTemplate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.TemplateMethodDP 6 | { 7 | public abstract class HouseTemplate 8 | { 9 | public void BuildHouse() 10 | { 11 | BuildFoundation(); 12 | BuildPillars(); 13 | BuildWalls(); 14 | BuildWindows(); 15 | Console.WriteLine("House is built"); 16 | } 17 | 18 | protected abstract void BuildFoundation(); 19 | protected abstract void BuildPillars(); 20 | protected abstract void BuildWalls(); 21 | protected abstract void BuildWindows(); 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/09-InterpreterDP/1-Context/Context.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.InterpreterDP 6 | { 7 | class Context 8 | 9 | { 10 | private string _input; 11 | private string _output; 12 | 13 | public string Input 14 | { 15 | get { return _input; } 16 | set { _input = value; } 17 | } 18 | 19 | public string Output 20 | { 21 | get { return _output; } 22 | set { _output = value; } 23 | } 24 | 25 | 26 | public Context(string input) 27 | { 28 | _input = input; 29 | } 30 | 31 | 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/3-MethodDependencyInjection/3-Injector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DependencyInjection.MethodDependencyInjection 6 | { 7 | class MInjector 8 | { 9 | public static void TryMethodInjector() 10 | { 11 | 12 | EmployeeBL employeeBL = new EmployeeBL(); 13 | 14 | List ListEmployee = employeeBL.GetAllEmployees(new EmployeeDAL()); 15 | 16 | foreach (Employee emp in ListEmployee) 17 | { 18 | Console.WriteLine("ID = {0}, Name = {1}, Department = {2}", 19 | emp.ID, emp.Name, emp.Department); 20 | } 21 | 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/Employee.cs: -------------------------------------------------------------------------------- 1 | namespace RepositoryUsingEFinMVC.Models 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel.DataAnnotations; 6 | using System.ComponentModel.DataAnnotations.Schema; 7 | using System.Data.Entity.Spatial; 8 | 9 | [Table("Employee")] 10 | public partial class Employee 11 | { 12 | public int EmployeeID { get; set; } 13 | 14 | [StringLength(100)] 15 | public string Name { get; set; } 16 | 17 | [StringLength(100)] 18 | public string Gender { get; set; } 19 | 20 | public int? Salary { get; set; } 21 | 22 | [StringLength(50)] 23 | public string Dept { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/2-Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace RepositoryUsingEFinMVC.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public ActionResult About() 17 | { 18 | ViewBag.Message = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public ActionResult Contact() 24 | { 25 | ViewBag.Message = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/4-BuilderDP/1-Report.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.BuilderDP 6 | { 7 | class Report 8 | { 9 | public string ReportType { get; set; } 10 | public string ReportHeader { get; set; } 11 | public string ReportFooter { get; set; } 12 | public string ReportContent { get; set; } 13 | public void DisplayReport() 14 | { 15 | Console.WriteLine("Report Type :" + ReportType); 16 | Console.WriteLine("Header :" + ReportHeader); 17 | Console.WriteLine("Content :" + ReportContent); 18 | Console.WriteLine("Footer :" + ReportFooter); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/1-ConstructorDependencyInjection/3-Injector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DependencyInjection.ConstructorDependencyInjection 6 | { 7 | class CInjector 8 | { 9 | public static void TryConstructorInjector() 10 | { 11 | EmployeeBL employeeBL = new EmployeeBL( new EmployeeDAL() ); 12 | 13 | List ListEmployee = employeeBL.GetAllEmployees(); 14 | foreach (Employee emp in ListEmployee) 15 | { 16 | Console.WriteLine("ID = {0}, Name = {1}, Department = {2}", 17 | emp.ID , emp.Name , emp.Department ); 18 | } 19 | 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/Program.cs: -------------------------------------------------------------------------------- 1 | using DependencyInjection.ConstructorDependencyInjection; 2 | using DependencyInjection.MethodDependencyInjection; 3 | using DependencyInjection.PropertyDependencyInjection; 4 | using System; 5 | 6 | namespace DependencyInjection 7 | { 8 | class Program 9 | { 10 | static void Main(string[] args) 11 | { 12 | Console.WriteLine("\nConstructor Dependency Injection \n"); 13 | CInjector.TryConstructorInjector(); 14 | 15 | Console.WriteLine("\nProperty Dependency Injection \n"); 16 | PInjector.TryConstructorInjector(); 17 | 18 | Console.WriteLine("\nMethod Dependency Injection \n"); 19 | MInjector.TryMethodInjector(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/Database Script.txt: -------------------------------------------------------------------------------- 1 | -- Create EmployeeDB database 2 | CREATE DATABASE EmployeeDB 3 | GO 4 | USE EmployeeDB 5 | GO 6 | -- Create Employee Table 7 | CREATE TABLE Employee 8 | ( 9 | EmployeeID INT PRIMARY KEY IDENTITY(1,1), 10 | Name VARCHAR(100), 11 | Gender VARCHAR(100), 12 | Salary INT, 13 | Dept VARCHAR(50) 14 | ) 15 | GO 16 | -- Populate some test data into Employee table 17 | INSERT INTO Employee VALUES('Mohamed', 'Male', 10000, 'IT' ) 18 | INSERT INTO Employee VALUES('Omar', 'Male', 15000, 'HR' ) 19 | INSERT INTO Employee VALUES('Sarah', 'Female', 22000, 'HR' ) 20 | INSERT INTO Employee VALUES('Ali', 'Male', 20000, 'IT' ) 21 | INSERT INTO Employee VALUES('Khadija', 'Female', 25000, 'IT' ) 22 | INSERT INTO Employee VALUES('Aisha', 'Female', 20000, 'HR' ) 23 | GO 24 | SELECT * FROM Employee 25 | GO -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/10-MediatorDP/4-ConcreteColleagues/ConcreteParticipant.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.MediatorDP 6 | { 7 | public class ConcreteParticipant : Participant 8 | { 9 | public ConcreteParticipant(Chatroom mediator, string name) : base(mediator, name) 10 | { 11 | } 12 | public override void Receive(string message) 13 | { 14 | Console.WriteLine(name + ": Received Message:" + message); 15 | } 16 | public override void Send(string message) 17 | { 18 | Console.WriteLine(name + ": Sending Message=" + message + "\n"); 19 | mediator.SendMessage(message, this); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/07-VisitorDP/5-ObjectStructure/Company.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.VisitorDP 6 | { 7 | public class Company 8 | { 9 | private static List elements = new List(); 10 | public void Add(IElement employee) 11 | { 12 | elements.Add(employee); 13 | } 14 | 15 | public void Remove(IElement employee) 16 | { 17 | elements.Remove(employee); 18 | } 19 | 20 | public void PerformOperation(IVisitor visitor) 21 | { 22 | foreach (var element in elements) 23 | { 24 | element.Accept(visitor); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/08-StrategyDP/3-Context/CompressionContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.StrategyDP 6 | { 7 | public class CompressionContext 8 | { 9 | private ICompression _Compression; 10 | public CompressionContext() {} 11 | public CompressionContext(ICompression Compression) 12 | { 13 | _Compression = Compression; 14 | } 15 | public void SetStrategy(ICompression Compression) 16 | { 17 | _Compression = Compression; 18 | } 19 | public void CompressFolder(string compressedArchiveFileName) 20 | { 21 | _Compression.Compress(compressedArchiveFileName); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/2-PropertyDependencyInjection/3-Injector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DependencyInjection.PropertyDependencyInjection 6 | { 7 | class PInjector 8 | { 9 | public static void TryConstructorInjector() 10 | { 11 | EmployeeBL employeeBL = new EmployeeBL(); 12 | 13 | employeeBL.employeeDataObject = new EmployeeDAL(); 14 | 15 | List ListEmployee = employeeBL.GetAllEmployees(); 16 | foreach (Employee emp in ListEmployee) 17 | { 18 | Console.WriteLine("ID = {0}, Name = {1}, Department = {2}", 19 | emp.ID , emp.Name , emp.Department); 20 | } 21 | 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/5-CompositeDP/2-Leaf.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.CompositeDP 6 | { 7 | public class Leaf : IComponent 8 | { 9 | public int Price { get; set; } 10 | public string Name { get; set; } 11 | public Leaf(string name, int price) 12 | { 13 | Price = price; 14 | Name = name; 15 | } 16 | public string GetName() 17 | { 18 | return Name; 19 | } 20 | public int GetPrice() 21 | { 22 | return Price; 23 | } 24 | public void GetDetails() 25 | { 26 | Console.WriteLine("Name: " + Name + "\nPrice: " + Price + "\n"); 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/6-ProxyDP/1-VirtualProxy/2-RealSubject.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace StructuralDesignPatterns.ProxyDP 8 | { 9 | 10 | class RealImage : IImage 11 | { 12 | private string fileName; 13 | 14 | public RealImage(string fileName) 15 | { 16 | this.fileName = fileName; 17 | 18 | loadFromDisk(fileName); 19 | } 20 | private void loadFromDisk(String fileName) 21 | { 22 | Console.WriteLine("Loading " + fileName); 23 | } 24 | public void display() 25 | { 26 | Console.WriteLine("Beginning Of display Method"); 27 | Console.WriteLine("Displaying " + fileName); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/01-IteratorDP/UsingList/4-ConcreteAggregate.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Collections.Generic; 3 | namespace BehavioralDesignPatterns.IteratorDP.UsingList 4 | { 5 | class ConcreteAggregate : IAggregate 6 | { 7 | private List _StudentsList = new List(); 8 | 9 | public Iterator CreateIterator() 10 | { 11 | return new Iterator(this); 12 | } 13 | 14 | public int Count 15 | { 16 | get { return _StudentsList.Count; } 17 | } 18 | 19 | public void AddElement(Student student) 20 | { 21 | 22 | _StudentsList.Add(student); 23 | } 24 | 25 | public Student GetElement(int IndexPosition) 26 | { 27 | return _StudentsList[IndexPosition]; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/1-AdapterDB/1-ObjectAdapterDP/4-Client.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace StructuralDesignPatterns.AdapterDB.ObjectAdapterDP 4 | { 5 | class ClientA 6 | { 7 | public static void UsingObjectAdapter() 8 | { 9 | 10 | var employeesArray = new string[][] 11 | { 12 | new string[4] { "101", "John", "SE", "10000" }, 13 | new string[4] { "101", "John", "SE", "10000" }, 14 | new string[4] { "101", "John", "SE", "10000" }, 15 | new string[4] { "101", "John", "SE", "10000" }, 16 | new string[4] { "101", "John", "SE", "10000" } 17 | }; 18 | 19 | 20 | ITarget target = new EmployeeAdapter(); 21 | 22 | target.ProcessCompanySalary(employeesArray); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/3-DecoratorDP/3-Decorator/CarAccessoriesDecorator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.DecoratorDP 6 | { 7 | abstract class CarAccessoriesDecorator : ICar 8 | { 9 | private ICar _car; 10 | public CarAccessoriesDecorator(ICar car) 11 | { 12 | _car = car; 13 | } 14 | 15 | public virtual double GetCost() 16 | { 17 | return _car.GetCost(); 18 | } 19 | 20 | public virtual string GetDescription() 21 | { 22 | return _car.GetDescription(); 23 | } 24 | 25 | public override string ToString() 26 | { 27 | return "Description : " + GetDescription() + "\nCost :" + GetCost(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/1-FactoryDP/2- WithFactoryDP/1-CreditCardFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryDP 6 | { 7 | class CreditCardFactory 8 | { 9 | public static ICreditCard GetCardInstance(string cardType) 10 | { 11 | ICreditCard creditCard = null; 12 | if (cardType == "MoneyBack") 13 | { 14 | creditCard = new MoneyBack(); 15 | } 16 | else if (cardType == "Titanium") 17 | { 18 | creditCard = new Titanium(); 19 | } 20 | else if (cardType == "Platinum") 21 | { 22 | creditCard = new Platinum(); 23 | } 24 | return creditCard; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/3-DecoratorDP/2-ConcreteComponent/BMW.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.DecoratorDP 6 | { 7 | class BMW : ICar 8 | { 9 | public string Description { get; set; } 10 | public double Cost { get; set; } 11 | 12 | public BMW() 13 | { 14 | Description = "BMW"; 15 | Cost = 5000; 16 | } 17 | 18 | public double GetCost() 19 | { 20 | return Cost; 21 | } 22 | 23 | public string GetDescription() 24 | { 25 | return Description; 26 | } 27 | 28 | public override string ToString() 29 | { 30 | return "Description : " + GetDescription() + "\nCost :" + GetCost(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/2-PropertyDependencyInjection/1-Service.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DependencyInjection.PropertyDependencyInjection 6 | { 7 | public interface IEmployeeDAL 8 | { 9 | List GetAllEmployees(); 10 | } 11 | public class EmployeeDAL : IEmployeeDAL 12 | { 13 | public List GetAllEmployees() 14 | { 15 | List ListEmployees = new List(); 16 | ListEmployees.Add(new Employee() { ID = 1, Name = "Pranaya", Department = "IT" }); 17 | ListEmployees.Add(new Employee() { ID = 2, Name = "Kumar", Department = "HR" }); 18 | ListEmployees.Add(new Employee() { ID = 3, Name = "Rout", Department = "Payroll" }); 19 | return ListEmployees; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/3-MethodDependencyInjection/1-Service.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DependencyInjection.MethodDependencyInjection 6 | { 7 | public interface IEmployeeDAL 8 | { 9 | List GetAllEmployees(); 10 | } 11 | public class EmployeeDAL : IEmployeeDAL 12 | { 13 | public List GetAllEmployees() 14 | { 15 | List ListEmployees = new List(); 16 | ListEmployees.Add(new Employee() { ID = 1, Name = "Pranaya", Department = "IT" }); 17 | ListEmployees.Add(new Employee() { ID = 2, Name = "Kumar", Department = "HR" }); 18 | ListEmployees.Add(new Employee() { ID = 3, Name = "Rout", Department = "Payroll" }); 19 | return ListEmployees; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/1-AdapterDB/2-ClassAdapterDP/4-Client.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace StructuralDesignPatterns.AdapterDB.ClassAdapterDP 4 | { 5 | class ClientB 6 | { 7 | public static void UsingClassAdapte() 8 | { 9 | 10 | var employeesArray = new string[][] 11 | { 12 | new string[4] { "101", "John", "SE", "10000" }, 13 | new string[4] { "101", "John", "SE", "10000" }, 14 | new string[4] { "101", "John", "SE", "10000" }, 15 | new string[4] { "101", "John", "SE", "10000" }, 16 | new string[4] { "101", "John", "SE", "10000" } 17 | }; 18 | 19 | 20 | ITarget target = new EmployeeAdapter(); 21 | target.ProcessCompanySalary(employeesArray); 22 | 23 | 24 | } 25 | } 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/04-StateDP/1-State/State.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.StateDP 6 | { 7 | abstract class State 8 | 9 | { 10 | protected Account account; 11 | protected double balance; 12 | protected double lowerLimit; 13 | protected double upperLimit; 14 | protected double serviceFee; 15 | 16 | public Account Account 17 | { 18 | get { return account; } 19 | set { account = value; } 20 | } 21 | 22 | public double Balance 23 | { 24 | get { return balance; } 25 | set { balance = value; } 26 | } 27 | 28 | public abstract void Deposit(double amount); 29 | public abstract void Withdraw(double amount); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/3-DecoratorDP/2-ConcreteComponent/Mercedes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.DecoratorDP 6 | { 7 | class Mercedes : ICar 8 | { 9 | public string Description { get; set; } 10 | public double Cost { get; set; } 11 | 12 | public Mercedes() 13 | { 14 | Description = "Mercedes"; 15 | Cost = 6000; 16 | } 17 | public double GetCost() 18 | { 19 | return Cost; 20 | } 21 | 22 | public string GetDescription() 23 | { 24 | return Description; 25 | } 26 | 27 | public override string ToString() 28 | { 29 | return "Description : " + GetDescription() + "\nCost :" + GetCost(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/01-IteratorDP/UsingArrayList/4-ConcreteAggregate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | 4 | namespace BehavioralDesignPatterns.IteratorDP.UsingArrayList 5 | { 6 | class ConcreteAggregate : IAggregate 7 | { 8 | private ArrayList _StudentsList = new ArrayList(); 9 | 10 | public Iterator CreateIterator() 11 | { 12 | return new Iterator(this); 13 | } 14 | 15 | public int Count 16 | { 17 | get { return _StudentsList.Count; } 18 | } 19 | 20 | public void AddElement(Student student) 21 | { 22 | _StudentsList.Add(student); 23 | } 24 | 25 | public Student GetElement(int IndexPosition) 26 | { 27 | 28 | return _StudentsList[IndexPosition] as Student; 29 | } 30 | 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/1-ConstructorDependencyInjection/1-Service.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DependencyInjection.ConstructorDependencyInjection 6 | { 7 | public interface IEmployeeDAL 8 | { 9 | List GetAllEmployees(); 10 | } 11 | public class EmployeeDAL : IEmployeeDAL 12 | { 13 | public List GetAllEmployees() 14 | { 15 | List ListEmployees = new List(); 16 | ListEmployees.Add(new Employee() { ID = 1, Name = "Pranaya", Department = "IT" }); 17 | ListEmployees.Add(new Employee() { ID = 2, Name = "Kumar", Department = "HR" }); 18 | ListEmployees.Add(new Employee() { ID = 3, Name = "Rout", Department = "Payroll" }); 19 | return ListEmployees; 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/10-MediatorDP/2-ConcreteMediator/Chatroom.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.MediatorDP 6 | { 7 | public class Chatroom : IChatroom 8 | { 9 | private List ParticipantsList = new List(); 10 | public void RegisterUser(Participant participant) 11 | { 12 | ParticipantsList.Add(participant); 13 | } 14 | 15 | 16 | 17 | public void SendMessage(string message, Participant participant) 18 | { 19 | foreach (var Participant in ParticipantsList) 20 | { 21 | 22 | if (Participant != participant) 23 | { 24 | Participant.Receive(message); 25 | } 26 | } 27 | } 28 | 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/1-FactoryDP/2- WithFactoryDP/ClientApplyFactoryDB.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryDP 6 | { 7 | class ClientApplyFactoryDB 8 | { 9 | public static void UsingFactoryDP() 10 | { 11 | 12 | ICreditCard cardDetails = CreditCardFactory.GetCardInstance("Platinum"); 13 | 14 | if (cardDetails != null) 15 | { 16 | Console.WriteLine("CardType : " + cardDetails.GetCardType()); 17 | Console.WriteLine("CreditLimit : " + cardDetails.GetCreditLimit()); 18 | Console.WriteLine("AnnualCharge :" + cardDetails.GetAnnualCharge()); 19 | } 20 | else 21 | { 22 | Console.Write("Invalid Card Type"); 23 | } 24 | 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/6-ProxyDP/2-ProtectionProxy/3-Proxy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.ProxyDP 6 | { 7 | class SharedFolderProxy : ISharedFolder 8 | { 9 | private ISharedFolder folder; 10 | private Person _person; 11 | public SharedFolderProxy(Person person) 12 | { 13 | _person = person; 14 | } 15 | public void PerformRWOperations() 16 | { 17 | if ( _person.Role == role.CEO || _person.Role ==role.MANAGER) 18 | { 19 | folder = new SharedFolder(); 20 | folder.PerformRWOperations(); 21 | } 22 | else 23 | { 24 | Console.WriteLine 25 | ("You don't have permission to access this folder"); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/2-FactoryMethodDP/ClientUseFactoryDPWithFactoryMethod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryMethodDP 6 | { 7 | class ClientUseFactoryDPWithFactoryMethod 8 | { 9 | public static void UsingFactoryDP(ICreditCardFactory creditCard) 10 | { 11 | ICreditCard cardDetails = CreditCardFactory.GetCardInstance(creditCard); 12 | if (cardDetails != null) 13 | { 14 | Console.WriteLine("CardType : " + cardDetails.GetCardType()); 15 | Console.WriteLine("CreditLimit : " + cardDetails.GetCreditLimit()); 16 | Console.WriteLine("AnnualCharge :" + cardDetails.GetAnnualCharge()); 17 | } 18 | else 19 | { 20 | Console.Write("Invalid Card Type"); 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/05-TemplateMethodDP/WoodenHouse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.TemplateMethodDP 6 | { 7 | public class WoodenHouse : HouseTemplate 8 | { 9 | protected override void BuildFoundation() 10 | { 11 | Console.WriteLine 12 | ("Building foundation with cement, iron rods, " 13 | + "wood and sand"); 14 | } 15 | protected override void BuildPillars() 16 | { 17 | Console.WriteLine 18 | ("Building wood Pillars with wood coating"); 19 | } 20 | protected override void BuildWalls() 21 | { 22 | Console.WriteLine("Building Wood Walls"); 23 | } 24 | protected override void BuildWindows() 25 | { 26 | Console.WriteLine("Building Wood Windows"); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/3-BothGenericAndNonGenericRepository/NonGeneric/2-EmployeeRepositorycs.cs: -------------------------------------------------------------------------------- 1 | 2 | using RepositoryUsingEFinMVC.Models; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Data.Entity; 6 | using System.Linq; 7 | using System.Web; 8 | 9 | namespace RepositoryUsingEFinMVC.BothGenericAndNonGenericRepository 10 | { 11 | public class EmployeeRepository : GenericRepository, IEmployeeRepository 12 | { 13 | public EmployeeRepository(EmployeeDBContext context) : base(context) 14 | { 15 | } 16 | 17 | public IEnumerable GetEmployeesByGender(string Gender) 18 | { 19 | return entity.Where(emp => emp.Gender == Gender).ToList(); 20 | } 21 | 22 | public IEnumerable GetEmployeesByDepartment(string Dept) 23 | { 24 | return entity.Where(emp => emp.Dept == Dept).ToList(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/05-TemplateMethodDP/ConcreteHouse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.TemplateMethodDP 6 | { 7 | public class ConcreteHouse : HouseTemplate 8 | { 9 | protected override void BuildFoundation() 10 | { 11 | Console.WriteLine 12 | ("Building foundation with cement, iron rods " 13 | +"and sand"); 14 | } 15 | protected override void BuildPillars() 16 | { 17 | Console.WriteLine 18 | ("Building Concrete Pillars with Cement and Sand"); 19 | } 20 | protected override void BuildWalls() 21 | { 22 | Console.WriteLine("Building Concrete Walls"); 23 | } 24 | protected override void BuildWindows() 25 | { 26 | Console.WriteLine("Building Concrete Windows"); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/03-ChainOfResponsibility/2-ConcreteHandlers/HundredHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.ChainOfResponsibility 6 | { 7 | public class HundredHandler : Handler 8 | { 9 | public override void Handle(long requestedAmount) 10 | { 11 | long NumberOfBanknotesToTakeOfThisHandler = requestedAmount / 100; 12 | if (NumberOfBanknotesToTakeOfThisHandler > 0) 13 | { 14 | 15 | Console.WriteLine 16 | ("Number Of Banknotes Taken By HundredHandler : " + NumberOfBanknotesToTakeOfThisHandler); 17 | 18 | } 19 | long pendingAmountToBeProcessed = requestedAmount % 100; 20 | if (pendingAmountToBeProcessed > 0) 21 | { 22 | nextHandler.Handle(pendingAmountToBeProcessed); 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/4-UnitofWorkWithGenericRepository/NonGeneric/2-EmployeeRepositorycs.cs: -------------------------------------------------------------------------------- 1 | 2 | using RepositoryUsingEFinMVC.Models; 3 | using RRepositoryUsingEFinMVC.UnitofWork; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Data.Entity; 7 | using System.Linq; 8 | using System.Web; 9 | 10 | namespace RepositoryUsingEFinMVC.UnitofWork 11 | { 12 | public class EmployeeRepository : GenericRepository, IEmployeeRepository 13 | { 14 | public EmployeeRepository(EmployeeDBContext context) : base(context) 15 | { 16 | } 17 | public IEnumerable GetEmployeesByGender(string Gender) 18 | { 19 | return entity.Where(emp => emp.Gender == Gender).ToList(); 20 | } 21 | 22 | public IEnumerable GetEmployeesByDepartment(string Dept) 23 | { 24 | return entity.Where(emp => emp.Dept == Dept).ToList(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Migrations/202104030932003_f.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | namespace RepositoryUsingEFinMVC.Migrations 3 | { 4 | using System.CodeDom.Compiler; 5 | using System.Data.Entity.Migrations; 6 | using System.Data.Entity.Migrations.Infrastructure; 7 | using System.Resources; 8 | 9 | [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")] 10 | public sealed partial class f : IMigrationMetadata 11 | { 12 | private readonly ResourceManager Resources = new ResourceManager(typeof(f)); 13 | 14 | string IMigrationMetadata.Id 15 | { 16 | get { return "202104030932003_f"; } 17 | } 18 | 19 | string IMigrationMetadata.Source 20 | { 21 | get { return null; } 22 | } 23 | 24 | string IMigrationMetadata.Target 25 | { 26 | get { return Resources.GetString("Target"); } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/03-ChainOfResponsibility/2-ConcreteHandlers/FiveHundredHandlercs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.ChainOfResponsibility 6 | { 7 | public class FiveHundredHandler : Handler 8 | { 9 | public override void Handle(long requestedAmount) 10 | { 11 | long NumberOfBanknotesToTakeOfThisHandler = requestedAmount / 500; 12 | if (NumberOfBanknotesToTakeOfThisHandler > 0) 13 | { 14 | 15 | Console.WriteLine 16 | ("Number Of Banknotes Taken By FiveHundredHandler : " + NumberOfBanknotesToTakeOfThisHandler); 17 | 18 | } 19 | long pendingAmountToBeProcessed = requestedAmount % 500; 20 | if (pendingAmountToBeProcessed > 0) 21 | { 22 | nextHandler.Handle(pendingAmountToBeProcessed); 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/03-ChainOfResponsibility/2-ConcreteHandlers/TwoHundredHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.ChainOfResponsibility 6 | { 7 | public class TwoHundredHandler : Handler 8 | { 9 | public override void Handle(long requestedAmount) 10 | { 11 | long NumberOfBanknotesToTakeOfThisHandler = requestedAmount / 200; 12 | if (NumberOfBanknotesToTakeOfThisHandler > 0) 13 | { 14 | 15 | Console.WriteLine 16 | ("Number Of Banknotes Taken By TwoHundredHandler : " + NumberOfBanknotesToTakeOfThisHandler); 17 | 18 | 19 | } 20 | long pendingAmountToBeProcessed = requestedAmount % 200; 21 | if (pendingAmountToBeProcessed > 0) 22 | { 23 | nextHandler.Handle(pendingAmountToBeProcessed); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/11-MementoDP/Originator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.MementoDP 6 | { 7 | public class Originator 8 | { 9 | public string FirstName { get; set; } 10 | public string SecondName { get; set; } 11 | public int Age { get; set; } 12 | 13 | public Memento CreateMemento() 14 | { 15 | return new Memento(FirstName, SecondName, Age); 16 | } 17 | public void Restore(Memento memento) 18 | { 19 | FirstName = memento.FirstName; 20 | SecondName = memento.SecondName; 21 | Age = memento.Age; 22 | } 23 | 24 | public string GetDetails() 25 | { 26 | return "[ First Name " + FirstName + 27 | ", Second Name= " + SecondName + 28 | ", Age= " + Age + "]"; 29 | } 30 | 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/03-ChainOfResponsibility/2-ConcreteHandlers/TwoThousandHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.ChainOfResponsibility 6 | { 7 | public class TwoThousandHandler : Handler 8 | { 9 | public override void Handle(long requestedAmount) 10 | { 11 | long NumberOfBanknotesToTakeOfThisHandler = requestedAmount / 2000; 12 | if (NumberOfBanknotesToTakeOfThisHandler > 0) 13 | { 14 | 15 | Console.WriteLine 16 | ("Number Of Banknotes Taken By TwoThousandHandler : " + NumberOfBanknotesToTakeOfThisHandler); 17 | 18 | } 19 | 20 | long pendingAmountToBeProcessed = requestedAmount % 2000; 21 | 22 | if (pendingAmountToBeProcessed > 0) 23 | { 24 | nextHandler.Handle(pendingAmountToBeProcessed); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/7-SingletonDP/1-NoThreadSafe/NoThreadSafe.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.SingletonDP 6 | { 7 | public sealed class NoThreadSafe :ISingletonObj 8 | { 9 | private static int counter = 0; 10 | 11 | private static NoThreadSafe instance = null; 12 | 13 | public static NoThreadSafe GetInstance 14 | { 15 | get 16 | { 17 | if (instance == null) 18 | instance = new NoThreadSafe(); 19 | return instance; 20 | } 21 | } 22 | 23 | private NoThreadSafe() 24 | { 25 | counter++; 26 | Console.WriteLine("Counter Value " + counter.ToString()); 27 | } 28 | 29 | public void PrintDetails(string message) 30 | { 31 | Console.WriteLine(message); 32 | } 33 | } 34 | } 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection/2-PropertyDependencyInjection/2-Client.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DependencyInjection.PropertyDependencyInjection 6 | { 7 | public class EmployeeBL 8 | { 9 | private IEmployeeDAL _employeeDAL; 10 | 11 | public IEmployeeDAL employeeDataObject 12 | { 13 | set 14 | { 15 | _employeeDAL = value; 16 | } 17 | get 18 | { 19 | if (employeeDataObject == null) 20 | { 21 | throw new Exception("Employee is not initialized"); 22 | } 23 | else 24 | { 25 | return _employeeDAL; 26 | } 27 | } 28 | } 29 | 30 | public List GetAllEmployees() 31 | { 32 | return _employeeDAL.GetAllEmployees(); 33 | } 34 | } 35 | } 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/1-RepositoryDP/EmployeeDBContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | 6 | namespace RepositoryUsingEFinMVC.Models 7 | { 8 | public partial class EmployeeDBContext : DbContext 9 | { 10 | public EmployeeDBContext() 11 | : base("name=EmployeeContext") 12 | { 13 | } 14 | 15 | public virtual DbSet Employees { get; set; } 16 | 17 | protected override void OnModelCreating(DbModelBuilder modelBuilder) 18 | { 19 | modelBuilder.Entity() 20 | .Property(e => e.Name) 21 | .IsUnicode(false); 22 | 23 | modelBuilder.Entity() 24 | .Property(e => e.Gender) 25 | .IsUnicode(false); 26 | 27 | modelBuilder.Entity() 28 | .Property(e => e.Dept) 29 | .IsUnicode(false); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/03-ChainOfResponsibility/3-Client/ATM.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.ChainOfResponsibility 6 | { 7 | public class ATM 8 | { 9 | private TwoThousandHandler _twoThousandHandler = new TwoThousandHandler(); 10 | private FiveHundredHandler _fiveHundredHandler = new FiveHundredHandler(); 11 | private TwoHundredHandler _twoHundredHandler = new TwoHundredHandler(); 12 | private HundredHandler _hundredHandler = new HundredHandler(); 13 | 14 | public ATM() 15 | { 16 | // Prepare the chain of Handlers 17 | _twoThousandHandler.NextHandler(_fiveHundredHandler); 18 | _fiveHundredHandler.NextHandler(_twoHundredHandler); 19 | _twoHundredHandler.NextHandler(_hundredHandler); 20 | } 21 | public void withdraw(long requestedAmount) 22 | { 23 | _twoThousandHandler.Handle(requestedAmount); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/01-IteratorDP/UsingList/2-ConcreteIterator.cs: -------------------------------------------------------------------------------- 1 | namespace BehavioralDesignPatterns.IteratorDP.UsingList 2 | { 3 | class Iterator : IIterator 4 | { 5 | private ConcreteAggregate _collection; 6 | private int _current = 0; 7 | private int _step = 1; 8 | 9 | public Iterator(ConcreteAggregate collection) 10 | { 11 | this._collection = collection; 12 | } 13 | 14 | public Student First() 15 | { 16 | _current = 0; 17 | return _collection.GetElement(_current); 18 | } 19 | 20 | public Student Next() 21 | { 22 | _current += _step; 23 | if (HasNext()) 24 | { 25 | return _collection.GetElement(_current); 26 | } 27 | else 28 | { 29 | return null; 30 | } 31 | } 32 | 33 | public bool HasNext() 34 | { 35 | return _current < _collection.Count; 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/4-BuilderDP/3-ConcreteBuilder/PDFReportBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.BuilderDP 6 | { 7 | 8 | class PDFReportBuilder : ReportBuilder 9 | { 10 | private Report _report; 11 | public PDFReportBuilder() 12 | { 13 | _report = new Report(); 14 | } 15 | public override void SetReportContent() 16 | { 17 | _report.ReportContent = "PDF Content"; 18 | } 19 | public override void SetReportFooter() 20 | { 21 | _report.ReportFooter = "PDF Footer"; 22 | } 23 | public override void SetReportHeader() 24 | { 25 | _report.ReportHeader = "PDF Header"; 26 | } 27 | public override void SetReportType() 28 | { 29 | _report.ReportType = "PDF"; 30 | } 31 | public override Report GetReport() 32 | { 33 | return _report; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/01-IteratorDP/UsingArrayList/2-ConcreteIterator.cs: -------------------------------------------------------------------------------- 1 | namespace BehavioralDesignPatterns.IteratorDP.UsingArrayList 2 | { 3 | class Iterator : IIterator 4 | { 5 | private ConcreteAggregate _collection; 6 | private int _current = 0; 7 | private int _step = 1; 8 | 9 | public Iterator(ConcreteAggregate collection) 10 | { 11 | this._collection = collection; 12 | } 13 | 14 | public Student First() 15 | { 16 | _current = 0; 17 | return _collection.GetElement(_current); 18 | } 19 | 20 | public Student Next() 21 | { 22 | _current += _step; 23 | if (HasNext()) 24 | { 25 | return _collection.GetElement(_current); 26 | } 27 | else 28 | { 29 | return null; 30 | } 31 | } 32 | 33 | public bool HasNext() 34 | { 35 | return _current < _collection.Count; 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/7-SingletonDP/3-ThreadSafeUsingEagerLoadingAndLazyKeyword/1-ThreadSafeUsingEagerLoading.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.SingletonDP 6 | 7 | { 8 | 9 | public sealed class ThreadSafeUsingEagerLoading : ISingletonObj 10 | { 11 | private static int counter = 0; 12 | private ThreadSafeUsingEagerLoading() 13 | { 14 | counter++; 15 | Console.WriteLine("Counter Value " + counter.ToString()); 16 | } 17 | 18 | private static readonly ThreadSafeUsingEagerLoading singleInstance = 19 | new ThreadSafeUsingEagerLoading(); 20 | 21 | public static ThreadSafeUsingEagerLoading GetInstance 22 | { 23 | get 24 | { 25 | return singleInstance; 26 | } 27 | } 28 | public void PrintDetails(string message) 29 | { 30 | Console.WriteLine(message); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/7-SingletonDP/3-ThreadSafeUsingEagerLoadingAndLazyKeyword/2-ThreadSafeUsingLazyKeyword.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.SingletonDP 6 | { 7 | public sealed class ThreadSafeUsingLazyKeyword : ISingletonObj 8 | { 9 | private static int counter = 0; 10 | private ThreadSafeUsingLazyKeyword() 11 | { 12 | counter++; 13 | Console.WriteLine("Counter Value " + counter.ToString()); 14 | } 15 | private static readonly Lazy Instancelock = 16 | 17 | new Lazy(() => new ThreadSafeUsingLazyKeyword()); 18 | public static ThreadSafeUsingLazyKeyword GetInstance 19 | { 20 | get 21 | { 22 | return Instancelock.Value; 23 | } 24 | } 25 | public void PrintDetails(string message) 26 | { 27 | Console.WriteLine(message); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/4-BuilderDP/3-ConcreteBuilder/ExcelReportBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.BuilderDP 6 | { 7 | class ExcelReportBuilder : ReportBuilder 8 | { 9 | private Report _report; 10 | public ExcelReportBuilder() 11 | { 12 | _report = new Report(); 13 | } 14 | public override void SetReportContent() 15 | { 16 | _report.ReportContent = "Excel Content"; 17 | } 18 | public override void SetReportFooter() 19 | { 20 | _report.ReportFooter = "Excel Footer"; 21 | } 22 | public override void SetReportHeader() 23 | { 24 | _report.ReportHeader = "Excel Header"; 25 | } 26 | public override void SetReportType() 27 | { 28 | _report.ReportType = "Excel"; 29 | } 30 | public override Report GetReport() 31 | { 32 | return _report ; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/7-FlyweightDP/2-ConcreteFlyweight.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace StructuralDesignPatterns.FlyweightDP 6 | { 7 | public class Circle : Shape 8 | { 9 | public void Draw(ConsoleColor Color) 10 | { 11 | Console.WriteLine 12 | (Color + " Circle was drawn ", 13 | Console.ForegroundColor = Color); 14 | } 15 | } 16 | 17 | public class Triangle : Shape 18 | { 19 | public void Draw(ConsoleColor Color) 20 | { 21 | Console.WriteLine 22 | (Color + " Triangle was drawn", 23 | Console.ForegroundColor = Color); 24 | } 25 | } 26 | 27 | 28 | public class Rectangle : Shape 29 | { 30 | private ConsoleColor Color; 31 | public void Draw(ConsoleColor Color) 32 | { 33 | this.Color = Color; 34 | Console.WriteLine 35 | (Color + " Rectangle with was drawn", 36 | Console.ForegroundColor = Color); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/09-InterpreterDP/3-TerminalExpressions/TensExpression.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.InterpreterDP 6 | { 7 | class TensExpression : Expression 8 | 9 | { 10 | private Dictionary Tens = new Dictionary(); 11 | public TensExpression() 12 | { 13 | Tens.Add('0', ""); 14 | Tens.Add('2', " Twenty"); 15 | Tens.Add('3', " Thirty"); 16 | Tens.Add('4', " Forty"); 17 | Tens.Add('5', " Fifty"); 18 | Tens.Add('6', " Sixty"); 19 | Tens.Add('7', " Seventy"); 20 | Tens.Add('8', " Eighty"); 21 | Tens.Add('9', " Ninety"); 22 | } 23 | 24 | public override void Interpret(Context context) 25 | { 26 | var input = context.Input; 27 | if (input.Length >= 2) 28 | { 29 | var digitWeNeed = input[input.Length - 2]; 30 | context.Output += Tens[digitWeNeed]; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/11-MementoDP/Memento.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.MementoDP 6 | { 7 | public class Memento 8 | { 9 | public string FirstName { get; set; } 10 | public string SecondName { get; set; } 11 | public int Age { get; set; } 12 | public Memento(string firstName, string secondName, int age) 13 | { 14 | FirstName = firstName; 15 | SecondName = secondName; 16 | Age = age; 17 | } 18 | 19 | 20 | public Memento GetState() 21 | { 22 | return this; 23 | } 24 | 25 | public void SetState(Memento memento) 26 | { 27 | FirstName = memento.FirstName; 28 | SecondName = memento.SecondName; 29 | Age = memento.Age; 30 | } 31 | 32 | public string GetDetails() 33 | { 34 | return "[ First Name " + FirstName + 35 | ", Second Name= " + SecondName + 36 | ", Age= " + Age + "]"; 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/5-CompositeDP/3-Composite.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace StructuralDesignPatterns.CompositeDP 7 | { 8 | public class Composite : IComponent 9 | { 10 | public string Name { get; } 11 | public List Components; 12 | public Composite(string name) 13 | { 14 | Name = name; 15 | Components = new List(); 16 | } 17 | public void AddComponent(IComponent component) 18 | { 19 | Components.Add(component); 20 | } 21 | public string GetName() 22 | { 23 | return Name; 24 | } 25 | public int GetPrice() 26 | { 27 | return Components.Sum(c => c.GetPrice()); 28 | } 29 | 30 | public void GetDetails() 31 | { 32 | Console.WriteLine("Name: " + GetName() + "\nPrice: " + GetPrice() + "\n"); 33 | Components.ForEach((component) => 34 | { 35 | component.GetDetails(); 36 | }); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/09-InterpreterDP/3-TerminalExpressions/UnitsExpression.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.InterpreterDP 6 | { 7 | class UnitsExpression : Expression 8 | { 9 | private Dictionary Units = new Dictionary(); 10 | public UnitsExpression() 11 | { 12 | Units.Add('0', ""); 13 | Units.Add('1', " One"); 14 | Units.Add('2', " Two"); 15 | Units.Add('3', " Three"); 16 | Units.Add('4', " Four"); 17 | Units.Add('5', " Five"); 18 | Units.Add('6', " Six"); 19 | Units.Add('7', " Seven"); 20 | Units.Add('8', " Eight"); 21 | Units.Add('9', " Nine"); 22 | 23 | } 24 | public override void Interpret(Context context) 25 | { 26 | var input = context.Input; 27 | if (input.Length >= 1) 28 | { 29 | var digitWeNeed = input[input.Length - 1]; 30 | context.Output += Units[digitWeNeed]; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/7-SingletonDP/2-ThreadSafeInUsingLock/1-ThreadSafe.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.SingletonDP 6 | { 7 | public sealed class ThreadSafe : ISingletonObj 8 | { 9 | private static int counter = 0; 10 | 11 | private static readonly object Instancelock = new object(); 12 | 13 | private static ThreadSafe instance = null; 14 | private ThreadSafe() 15 | { 16 | counter++; 17 | Console.WriteLine("Counter Value " + counter.ToString()); 18 | } 19 | public static ThreadSafe GetInstance 20 | { 21 | get 22 | { 23 | lock (Instancelock) 24 | { 25 | if (instance == null) 26 | { 27 | instance = new ThreadSafe(); 28 | } 29 | return instance; 30 | } 31 | } 32 | } 33 | public void PrintDetails(string message) 34 | { 35 | Console.WriteLine(message); 36 | } 37 | } 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns/1-AdapterDB/2-ClassAdapterDP/3-Adapter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace StructuralDesignPatterns.AdapterDB.ClassAdapterDP 7 | { 8 | class EmployeeAdapter : ThirdPartyBillingSystem, ITarget 9 | { 10 | public Employee ConverToEmployee(string[] empAsString) 11 | { 12 | var Id = Convert.ToInt32(empAsString[0]); 13 | var Name = empAsString[1]; 14 | var Designation = empAsString[2]; 15 | var Salary = Convert.ToDecimal(empAsString[3]); 16 | 17 | return new Employee(Id, Name, Designation, Salary); 18 | } 19 | 20 | public void ProcessCompanySalary(string[][] employeesArray) 21 | { 22 | //Adapter here convert Array of Employee to List of Employee to be able 23 | //to pass it to thirdPartyBillingSystem as you in the following lines 24 | 25 | List listEmployee = new List(); 26 | listEmployee = employeesArray.ToList().Select(ConverToEmployee).ToList(); 27 | 28 | ProcessSalary(listEmployee); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Migrations/Configuration.cs: -------------------------------------------------------------------------------- 1 | namespace RepositoryUsingEFinMVC.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity; 5 | using System.Data.Entity.Migrations; 6 | using System.Linq; 7 | 8 | internal sealed class Configuration : DbMigrationsConfiguration 9 | { 10 | public Configuration() 11 | { 12 | AutomaticMigrationsEnabled = false; 13 | } 14 | 15 | protected override void Seed(RepositoryUsingEFinMVC.Models.EmployeeDBContext context) 16 | { 17 | // This method will be called after migrating to the latest version. 18 | 19 | // You can use the DbSet.AddOrUpdate() helper extension method 20 | // to avoid creating duplicate seed data. E.g. 21 | // 22 | // context.People.AddOrUpdate( 23 | // p => p.FullName, 24 | // new Person { FullName = "Andrew Peters" }, 25 | // new Person { FullName = "Brice Lambson" }, 26 | // new Person { FullName = "Rowan Miller" } 27 | // ); 28 | // 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/09-InterpreterDP/3-TerminalExpressions/ElevenToNineteenExpression.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.InterpreterDP 6 | { 7 | class ElevenToNineteenExpression : Expression 8 | { 9 | private Dictionary Hundreds = new Dictionary(); 10 | public ElevenToNineteenExpression() 11 | { 12 | Hundreds.Add('1', " Eleven"); 13 | Hundreds.Add('2', " Twelve"); 14 | Hundreds.Add('3', " Thirteen"); 15 | Hundreds.Add('4', " Fourteen"); 16 | Hundreds.Add('5', " Fifteen"); 17 | Hundreds.Add('6', " Sixteen"); 18 | Hundreds.Add('7', " SevenTeen"); 19 | Hundreds.Add('8', " Eighteen"); 20 | Hundreds.Add('9', " Nineteen"); 21 | 22 | } 23 | public override void Interpret(Context context) 24 | { 25 | var input = context.Input; 26 | if (input.Length >= 2) 27 | { 28 | var digitWeNeed = input[input.Length - 1]; 29 | context.Output += Hundreds[digitWeNeed]; 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Views/EmpsUsingUnitOfWork/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model RepositoryUsingEFinMVC.Models.Employee 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 |

Employee

11 |
12 |
13 |
14 | @Html.DisplayNameFor(model => model.Name) 15 |
16 | 17 |
18 | @Html.DisplayFor(model => model.Name) 19 |
20 | 21 |
22 | @Html.DisplayNameFor(model => model.Gender) 23 |
24 | 25 |
26 | @Html.DisplayFor(model => model.Gender) 27 |
28 | 29 |
30 | @Html.DisplayNameFor(model => model.Salary) 31 |
32 | 33 |
34 | @Html.DisplayFor(model => model.Salary) 35 |
36 | 37 |
38 | @Html.DisplayNameFor(model => model.Dept) 39 |
40 | 41 |
42 | @Html.DisplayFor(model => model.Dept) 43 |
44 | 45 |
46 |
47 |

48 | @Html.ActionLink("Edit", "Edit", new { id = Model.EmployeeID }) | 49 | @Html.ActionLink("Back to List", "Index") 50 |

51 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Views/EmpsWithoutRepository/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model RepositoryUsingEFinMVC.Models.Employee 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 |

Employee

11 |
12 |
13 |
14 | @Html.DisplayNameFor(model => model.Name) 15 |
16 | 17 |
18 | @Html.DisplayFor(model => model.Name) 19 |
20 | 21 |
22 | @Html.DisplayNameFor(model => model.Gender) 23 |
24 | 25 |
26 | @Html.DisplayFor(model => model.Gender) 27 |
28 | 29 |
30 | @Html.DisplayNameFor(model => model.Salary) 31 |
32 | 33 |
34 | @Html.DisplayFor(model => model.Salary) 35 |
36 | 37 |
38 | @Html.DisplayNameFor(model => model.Dept) 39 |
40 | 41 |
42 | @Html.DisplayFor(model => model.Dept) 43 |
44 | 45 |
46 |
47 |

48 | @Html.ActionLink("Edit", "Edit", new { id = Model.EmployeeID }) | 49 | @Html.ActionLink("Back to List", "Index") 50 |

51 | -------------------------------------------------------------------------------- /Dependency Injection Pattern/DependencyInjection/DependencyInjection.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31129.286 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DependencyInjection", "DependencyInjection\DependencyInjection.csproj", "{254403D7-4B78-467B-B79A-B6D096A65687}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {254403D7-4B78-467B-B79A-B6D096A65687}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {254403D7-4B78-467B-B79A-B6D096A65687}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {254403D7-4B78-467B-B79A-B6D096A65687}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {254403D7-4B78-467B-B79A-B6D096A65687}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {EDC98032-DCEF-4BC2-AC82-3E271E43F808} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Views/EmpsUsingGenericRepository/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model RepositoryUsingEFinMVC.Models.Employee 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 |

Employee

11 |
12 |
13 |
14 | @Html.DisplayNameFor(model => model.Name) 15 |
16 | 17 |
18 | @Html.DisplayFor(model => model.Name) 19 |
20 | 21 |
22 | @Html.DisplayNameFor(model => model.Gender) 23 |
24 | 25 |
26 | @Html.DisplayFor(model => model.Gender) 27 |
28 | 29 |
30 | @Html.DisplayNameFor(model => model.Salary) 31 |
32 | 33 |
34 | @Html.DisplayFor(model => model.Salary) 35 |
36 | 37 |
38 | @Html.DisplayNameFor(model => model.Dept) 39 |
40 | 41 |
42 | @Html.DisplayFor(model => model.Dept) 43 |
44 | 45 |
46 |
47 |

48 | @Html.ActionLink("Edit", "Edit", new { id = Model.EmployeeID }) | 49 | @Html.ActionLink("Back to List", "Index") 50 |

51 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Views/EmpsUsingNonGenericRepository/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model RepositoryUsingEFinMVC.Models.Employee 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 |

Employee

11 |
12 |
13 |
14 | @Html.DisplayNameFor(model => model.Name) 15 |
16 | 17 |
18 | @Html.DisplayFor(model => model.Name) 19 |
20 | 21 |
22 | @Html.DisplayNameFor(model => model.Gender) 23 |
24 | 25 |
26 | @Html.DisplayFor(model => model.Gender) 27 |
28 | 29 |
30 | @Html.DisplayNameFor(model => model.Salary) 31 |
32 | 33 |
34 | @Html.DisplayFor(model => model.Salary) 35 |
36 | 37 |
38 | @Html.DisplayNameFor(model => model.Dept) 39 |
40 | 41 |
42 | @Html.DisplayFor(model => model.Dept) 43 |
44 | 45 |
46 |
47 |

48 | @Html.ActionLink("Edit", "Edit", new { id = Model.EmployeeID }) | 49 | @Html.ActionLink("Back to List", "Index") 50 |

51 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31025.194 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RepositoryUsingEFinMVC", "RepositoryUsingEFinMVC\RepositoryUsingEFinMVC.csproj", "{67106C8C-6B04-473C-807E-DD4FAAA65AFA}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {67106C8C-6B04-473C-807E-DD4FAAA65AFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {67106C8C-6B04-473C-807E-DD4FAAA65AFA}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {67106C8C-6B04-473C-807E-DD4FAAA65AFA}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {67106C8C-6B04-473C-807E-DD4FAAA65AFA}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {3102E3A3-1A62-4CA5-BD79-14417E574EA1} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Repositorey Design Pattern/RepositoryUsingEFinMVC/RepositoryUsingEFinMVC/Views/EmpsBothGenericAndNonGenericRepository/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model RepositoryUsingEFinMVC.Models.Employee 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 |

Employee

11 |
12 |
13 |
14 | @Html.DisplayNameFor(model => model.Name) 15 |
16 | 17 |
18 | @Html.DisplayFor(model => model.Name) 19 |
20 | 21 |
22 | @Html.DisplayNameFor(model => model.Gender) 23 |
24 | 25 |
26 | @Html.DisplayFor(model => model.Gender) 27 |
28 | 29 |
30 | @Html.DisplayNameFor(model => model.Salary) 31 |
32 | 33 |
34 | @Html.DisplayFor(model => model.Salary) 35 |
36 | 37 |
38 | @Html.DisplayNameFor(model => model.Dept) 39 |
40 | 41 |
42 | @Html.DisplayFor(model => model.Dept) 43 |
44 | 45 |
46 |
47 |

48 | @Html.ActionLink("Edit", "Edit", new { id = Model.EmployeeID }) | 49 | @Html.ActionLink("Back to List", "Index") 50 |

51 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31229.75 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BehavioralDesignPatterns", "BehavioralDesignPatterns\BehavioralDesignPatterns.csproj", "{062B120C-E690-4749-83BE-3ACF25266B00}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {062B120C-E690-4749-83BE-3ACF25266B00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {062B120C-E690-4749-83BE-3ACF25266B00}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {062B120C-E690-4749-83BE-3ACF25266B00}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {062B120C-E690-4749-83BE-3ACF25266B00}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {2BA155AE-0ED5-45EA-872E-38B705286088} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31025.194 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreationalDesignPatterns", "CreationalDesignPatterns\CreationalDesignPatterns.csproj", "{F376AE27-81A5-4002-B327-146E6AC66DF1}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {F376AE27-81A5-4002-B327-146E6AC66DF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {F376AE27-81A5-4002-B327-146E6AC66DF1}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {F376AE27-81A5-4002-B327-146E6AC66DF1}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {F376AE27-81A5-4002-B327-146E6AC66DF1}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {D6EEE917-D522-4ADC-95B7-72DF1F194DD6} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Structural Design Patterns/StructuralDesignPatterns/StructuralDesignPatterns.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31129.286 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StructuralDesignPatterns", "StructuralDesignPatterns\StructuralDesignPatterns.csproj", "{5F5366F0-D909-40B6-9FA6-1B4B5793A15D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {5F5366F0-D909-40B6-9FA6-1B4B5793A15D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {5F5366F0-D909-40B6-9FA6-1B4B5793A15D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {5F5366F0-D909-40B6-9FA6-1B4B5793A15D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {5F5366F0-D909-40B6-9FA6-1B4B5793A15D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {E5FE33FE-7C23-4A68-BC58-F23FF846502A} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Behavioral Design Patterns/BehavioralDesignPatterns/BehavioralDesignPatterns/04-StateDP/2-ConcreteStates/RedState .cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BehavioralDesignPatterns.StateDP 6 | { 7 | class RedState : State 8 | 9 | { 10 | public RedState(State state) 11 | { 12 | Console.WriteLine("State = RedState"); 13 | balance = state.Balance; 14 | account = state.Account; 15 | Initialize(); 16 | } 17 | 18 | private void Initialize() 19 | { 20 | // Should come from a datasource 21 | lowerLimit = 0.0; 22 | upperLimit = 100.0; 23 | serviceFee = 0.05; 24 | } 25 | 26 | public override void Deposit(double amount) 27 | { 28 | balance += amount; 29 | StateChangeCheck(); 30 | } 31 | 32 | public override void Withdraw(double amount) 33 | { 34 | balance -= amount + serviceFee; 35 | StateChangeCheck(); 36 | } 37 | 38 | private void StateChangeCheck() 39 | { 40 | if (balance > upperLimit) 41 | { 42 | account.State = new SilverState(this); 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/5-FluentInterfaceDP/FluentEmployee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.BuilderDP 6 | { 7 | class FluentEmployee 8 | { 9 | private Employee employee = new Employee(); 10 | 11 | public FluentEmployee NameOfTheEmployee(string FullName) 12 | { 13 | employee.FullName = FullName; 14 | return this; 15 | } 16 | public FluentEmployee Born(string DateOfBirth) 17 | { 18 | employee.DateOfBirth = Convert.ToDateTime(DateOfBirth); 19 | return this; 20 | } 21 | public FluentEmployee WorkingOn(string Department) 22 | { 23 | employee.Department = Department; 24 | return this; 25 | } 26 | public FluentEmployee StaysAt(string Address) 27 | { 28 | employee.Address = Address; 29 | return this; 30 | } 31 | 32 | public void print() 33 | { 34 | Console.WriteLine("Emp Data \nname : {0} \nBorn : {1} \nWorking on : {2}\nStays At : {3} " 35 | , employee.FullName, employee.DateOfBirth, employee.Department, employee.Address); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Creational Design Patterns/CreationalDesignPatterns/CreationalDesignPatterns/1-FactoryDP/1-WithoutFactoryDP/ClientDontApplyFactoryDB.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CreationalDesignPatterns.FactoryDP 6 | { 7 | class ClientDontApplyFactoryDB 8 | { 9 | public static void WithoutUsingFactoryDP(string cardType) 10 | { 11 | ICreditCard cardDetails = null; 12 | if (cardType == "MoneyBack") 13 | { 14 | cardDetails = new MoneyBack(); 15 | } 16 | else if (cardType == "Titanium") 17 | { 18 | cardDetails = new Titanium(); 19 | } 20 | else if (cardType == "Platinum") 21 | { 22 | cardDetails = new Platinum(); 23 | } 24 | if (cardDetails != null) 25 | { 26 | Console.WriteLine("CardType : " + cardDetails.GetCardType()); 27 | Console.WriteLine("CreditLimit : " + cardDetails.GetCreditLimit()); 28 | Console.WriteLine("AnnualCharge :" + cardDetails.GetAnnualCharge()); 29 | } 30 | else 31 | { 32 | Console.Write("Invalid Card Type"); 33 | } 34 | 35 | } 36 | } 37 | } 38 | --------------------------------------------------------------------------------