|
| 1 | +# CodeFactory DataModels |
| 2 | +The primary strength of CodeFactory is its ability to generate real time data models directly from the Visual Studio environment. |
| 3 | +This ability makes it possible to do design time automation when delivering software. In this section we will provide a brief overview of the data models that are generated dynamically by the CodeFactory platform. These data models are used throughout the automation process. |
| 4 | + |
| 5 | +## Data Models |
| 6 | +All data models are plain old CLR objects or POCO's for short. Each data model is implemented as an immutable data class. This approach is used since an change to the underlying data model requires a complete regeneration of the data model from the visual studio environment to make sure you have the latest version of all data. |
| 7 | + |
| 8 | +Data model generation is either triggered during the trigger of a new automation process, or from various CodeFactory API calls that will request new copies of data models. |
| 9 | + |
| 10 | + |
| 11 | +## Solution Explorer Models (Project System) |
| 12 | +The following models are directly generated off the legacy and new project systems that are hosted by Visual Studio. |
| 13 | +The overview of each data model is designed to provide an overview of capabilties. It will not list every single data element or function. See help docs for the full description if each data model. |
| 14 | + |
| 15 | +### Solution |
| 16 | +Data model that represents the loaded solution. This provides the location of the solution as well as access to the projects in the solution. |
| 17 | + |
| 18 | +### Solution Folder |
| 19 | +Data model that represents a virtual folder that is at scope of the solution level. This provides acess to the name of the folder and the children that are hosted in this folder. |
| 20 | + |
| 21 | +### Project |
| 22 | +Data model that represents a loaded project that is managed in the solution. this provides access to the project location and name, and access to all children objects hosted in the project. |
| 23 | + |
| 24 | +### Project Reference |
| 25 | +Data model that represents a reference to a project hosted in the solution. This provides the name of the reference and the target artifact that is being referenced. |
| 26 | + |
| 27 | +### Project Folder |
| 28 | +The project folder model represents a folder under a target project. This will contain the path and name of the folder and the list of child objects that are managed under this project folder. |
| 29 | + |
| 30 | +### Document |
| 31 | +Model that represents a file that is hosted in a project, project folder, or solution folder. This will contain the path and the name of the file. As well as access to the full contents in the document itself. |
| 32 | + |
| 33 | +### C# Source Document |
| 34 | +The C# source document project system access as well as full access to the C# source code that is hosted in the document itself. |
| 35 | + |
| 36 | +## C# Language Models - (Source Code) |
| 37 | +CodeFactory has access to the C# language compiler and can dynamically generate data models the represent the C# based source code. |
| 38 | +CodeFactory provides direct access all the way down to member and type level data. |
| 39 | +In addition, will give you direct access to the raw source code at the target object level. |
| 40 | +The following are the data models that are generated whenever either accessing from source code files, or from directly referenced assemblies. |
| 41 | +The overview of each data model is designed to provide an overview of capabilties. It will not list every single data element or function. See help docs for the full description if each data model. |
| 42 | + |
| 43 | +### Soure Code |
| 44 | +The source code data model provides access to all elements that were compiled from the source code document. This includes the following. |
| 45 | + - Namespaces |
| 46 | + - Using Statements |
| 47 | + - Classes |
| 48 | + - Interfaces |
| 49 | + - Structures |
| 50 | + |
| 51 | +### Using Statement |
| 52 | +Using statement provides information on target namespaces to use in the code base. This includes the following. |
| 53 | + - Namespace |
| 54 | + - Alias |
| 55 | + |
| 56 | +### Namespace Statement |
| 57 | +Namespace model provides the target namespace that other c# code elements are contained in. |
| 58 | + |
| 59 | +### Attribute |
| 60 | +Attribute provides a data model of the type of the attribute and the parameters that have been assigned to the attribute. This includes the following |
| 61 | + - Name |
| 62 | + - Namespace |
| 63 | + - Named Parameters |
| 64 | + - Constructor Parameters |
| 65 | + |
| 66 | +### Attribute Parameter |
| 67 | +Data model that provides the data for a target parameter on an attribute. This includes the following. |
| 68 | + - Name (Optional) |
| 69 | + - Parameter values |
| 70 | + |
| 71 | +### Attribute Parameter Value |
| 72 | +Data model that provides a target value that is assigned to an attribute parameter. |
| 73 | + |
| 74 | +### Enum |
| 75 | +Enum data model provides the definition of an enumeration and the target values of the enumeration. |
| 76 | + |
| 77 | +### Class |
| 78 | +The Class data model provides data on a target class hosted in source code. This will include the following. |
| 79 | + - Attributes |
| 80 | + - Name |
| 81 | + - Namespace |
| 82 | + - Security Scope |
| 83 | + - Keywords |
| 84 | + - Inheritence (Base class and Interfaces) |
| 85 | + - Members (Events, Fields, Methods, Properties) |
| 86 | + |
| 87 | +### Interface |
| 88 | +The Interface data model provides data on the target interface definition in source code. This will include the following. |
| 89 | + - Attributes |
| 90 | + - Name |
| 91 | + - Namespace |
| 92 | + - Security Scope |
| 93 | + - Keywords |
| 94 | + - Inheritence (Interfaces) |
| 95 | + - Members (Events, Methods, Properties) |
| 96 | + |
| 97 | + |
| 98 | +### Structure |
| 99 | +The structure data model provides data on the target structure definition in source code. This will include the following. |
| 100 | + - Attributes |
| 101 | + - Name |
| 102 | + - Namespace |
| 103 | + - Security Scope |
| 104 | + - Keywords |
| 105 | + - Inheritence (Interfaces) |
| 106 | + - Members (Events, Fields, Methods, Properties) |
| 107 | + |
| 108 | +### Delegate |
| 109 | +The delegate model provides data on the definition of a delegate in source code. This will include the following. |
| 110 | +- Name |
| 111 | +- Namespace |
| 112 | +- Parameters |
| 113 | +- Return type |
| 114 | + |
| 115 | +### Event |
| 116 | +The event data model provides data on the definition of an event in source code. This will include the following. |
| 117 | + - Attributes |
| 118 | + - Name |
| 119 | + - Type |
| 120 | + - Security Scope |
| 121 | + - Keywords |
| 122 | + - EventHandlerMethod Definition |
| 123 | + |
| 124 | +### Field |
| 125 | +The field data model provides data on the definition of a field in source code. This will include the following. |
| 126 | + |
| 127 | + - Attributes |
| 128 | + - Name |
| 129 | + - Type |
| 130 | + - Security Scope |
| 131 | + - Keywords |
| 132 | + - Assigned value |
| 133 | + |
| 134 | +### Method |
| 135 | +The method data model provides data on the definition of a method in source code. This will include the following. |
| 136 | + - Attributes |
| 137 | + - Name |
| 138 | + - Security Scope |
| 139 | + - Keywords |
| 140 | + - Parameters |
| 141 | + - Return Type |
| 142 | + - Method Type |
| 143 | + |
| 144 | +### Property |
| 145 | +The property data model provides data on the definition of a property in source code. This will include the following. |
| 146 | + - Attributes |
| 147 | + - Name |
| 148 | + - Type |
| 149 | + - Propery Security |
| 150 | + - Keywords |
| 151 | + - Has Get |
| 152 | + - Get Security |
| 153 | + - Has Set |
| 154 | + - Set Security |
| 155 | + |
| 156 | +### Parameter |
| 157 | +The Parameter data model provides data on the definition of a parameter in a method or a delegate. This will include the following. |
| 158 | + - Attributes |
| 159 | + - Name |
| 160 | + - Keywords |
| 161 | + - Default value |
| 162 | + |
| 163 | +### Type |
| 164 | + The type datamodel provides information about a type that is used in all the above source code definition. This will include the following. |
| 165 | + - Name |
| 166 | + - Namespace |
| 167 | + - IsValueType |
| 168 | + - IsTuple |
| 169 | + - IsEnum |
| 170 | + - IsArray |
| 171 | + - IsClass |
| 172 | + - IsInterface |
| 173 | + - IsStructure |
| 174 | + |
| 175 | +[Link Here] - Return to Overview |
| 176 | + |
| 177 | + |
0 commit comments