https://github.com/marshalofficial/csharp-factory-method-pattern
csharp factory method design pattern
https://github.com/marshalofficial/csharp-factory-method-pattern
csharp design-patterns dotnet factory-method-pattern
Last synced: 3 months ago
JSON representation
csharp factory method design pattern
- Host: GitHub
- URL: https://github.com/marshalofficial/csharp-factory-method-pattern
- Owner: MarshalOfficial
- Created: 2022-06-27T16:48:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-27T16:48:10.000Z (over 3 years ago)
- Last Synced: 2023-03-12T03:57:07.589Z (almost 3 years ago)
- Topics: csharp, design-patterns, dotnet, factory-method-pattern
- Language: C#
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## C# Factory Method
The Factory Method design pattern defines an interface for creating an object, but let subclasses decide which class to instantiate. This pattern lets a class defer instantiation to subclasses.
### Frequency of use: high
### Participants:
The classes and objects participating in this pattern include:
- Product (Page):
-- defines the interface of objects the factory method creates
- ConcreteProduct (SkillsPage, EducationPage, ExperiencePage):
-- implements the Product interface
- Creator (Document):
-- declares the factory method, which returns an object of type Product. Creator may also define a default implementation of the factory method that returns a default ConcreteProduct object
-- may call the factory method to create a Product object.
- ConcreteCreator (Report, Resume):
-- overrides the factory method to return an instance of a ConcreteProduct.