|
1 | | -# CodeFactory |
2 | | -Main repository for the CodeFactory SDK and work tracking for SDK and the runtime. |
| 1 | +# CodeFactory™ |
| 2 | + |
| 3 | +# What is CodeFactory? |
| 4 | + |
| 5 | +In the simplest terms, CodeFactory is a real time software factory that is triggered from inside Visual Studio during the design and construction of software. |
| 6 | +CodeFactory allows for development staff to automate repetitive development tasks that take up developer’s time. |
| 7 | + |
| 8 | +## What is a Real Time Software Factory? |
| 9 | +A real time software factory is automation that can be triggered when ever requested and replace only target content within the solution. |
| 10 | +By not requiring complete regeneration of the entire file or process, you can do continuous real time management through automation. |
| 11 | + |
| 12 | +## What Can I Automate? |
| 13 | +Anything you base on a set of demonstrated repeatable steps can be turned into an automation. |
| 14 | +The following are the basic criteria for automation. |
| 15 | + |
| 16 | +### Data Sources |
| 17 | +How information is collected and provided to the automation process to execute. |
| 18 | +The following are common data sources used in automation: |
| 19 | + |
| 20 | +#### CodeFactory Data Models |
| 21 | +CodeFactory provided data about the Visual Studio environment. The following are the common types of models CodeFactory provides: |
| 22 | + - Solution Data |
| 23 | + - Project Data |
| 24 | + - Project Folder Data |
| 25 | + - Project File Data |
| 26 | + - Full C# Source Code Models from Code Files |
| 27 | + |
| 28 | +#### Collection of Information from the Developer |
| 29 | +A number of times we may need to get information directly from the developer in order for the automation to execute correctly. |
| 30 | +CodeFactory provides direct access to creating custom user interface screens that display information as if they were Visual Studio dialogs. |
| 31 | + |
| 32 | +#### Usage of 3rd Party Libraries |
| 33 | + |
| 34 | +CodeFactory allows direct access to the entire .NET framework, this allows for automation to use other third-party libraries to gather information. |
| 35 | +The following are some common examples of usage scenarios for collecting data: |
| 36 | + - Third party library to parse HTML files |
| 37 | + - Third party library to read in a target file format (markdown, yaml, json) |
| 38 | + - ADO.NET calls to a database to read out information used in the automation process |
| 39 | + |
| 40 | +### Automation Logic |
| 41 | +CodeFactory uses an event driven model for processing automation requests from Visual Studio. |
| 42 | +These events are called "commands" and once commands are executed the automation logic is managed directly in the native .NET framework C# programming language. |
| 43 | +Your logic is directly executed to run the expected functionality to build the output identified from the data you provided. |
| 44 | + |
| 45 | +Part of the automation process is providing common helper-based functionality to handle common automation Tasks. |
| 46 | +CodeFactory has a number of helpers built into the SDK to help with common activities found inside code automation. |
| 47 | + |
| 48 | +### Automation Formatting |
| 49 | +A key part of any software factory automation is formatting the final data into a target format expected to be added back into your project or solution in Visual Studio. |
| 50 | +CodeFactory provides direct access to the T4 templating engine hosted inside Visual Studio. This allows you to build up formatted output regardless of the target language or format needed. |
| 51 | + |
| 52 | +### Automation Output |
| 53 | +The final step in any automation process is output of the process itself. The following are common outputs from CodeFactory: |
| 54 | + |
| 55 | +#### Document Creation with Content |
| 56 | +CodeFactory allows for the creation of a new document either at the project level or the solution level. During the creation of the document the content is directly added at time of creation. |
| 57 | + |
| 58 | +#### Positional Based Content Management |
| 59 | +CodeFactory provides access to solution and project documents and allows you to update the content of documents based on the position within the document. This includes the following scenarios: |
| 60 | + - Remove content by position |
| 61 | + - Replace content by position |
| 62 | + - Add content before position |
| 63 | + - Add content after position |
| 64 | + |
| 65 | +#### C# Artifact Based Content Management |
| 66 | +CodeFactory give you direct access to update content within C# code files. This includes the following scenarios: |
| 67 | + - Add content in the beginning of a class, structure, or interface definition |
| 68 | + - Add content at the end of a class, structure, or interface definition. |
| 69 | + - Add a class, structure, or interface to a code file |
| 70 | + - Remove a class, structure, or interface to a code file |
| 71 | + - Remove a member (field, property, event, or method) |
| 72 | + - Replace a member (field, property, event, or method) with updated content. |
| 73 | + - Add content before a member (field, property, event, or method) |
| 74 | + - Add content after a member (field, property, event, or method) |
0 commit comments