Skip to content

Code Structure

Magnus Gether Sørensen edited this page Aug 29, 2017 · 1 revision

XrmContext works by querying CRM for metadata, which it can then generate typings for. The end point is located in XrmContext.fs. Here two functions are called, retrieveRawState and generateFromRaw. The first fetches metadata from CRM, and the second generates typings based upon the metadata. These two methods can be stepped through, as to see what is called.

The rest of this section will describe the contents of each folder in the project.

Resources

This folder contains a .cs file, which is referenced by the typings. This file contains the defintion of an ExtendedEntity as well as helpful methods, which are used directly on the entity.

Crm

This folder contains helper methods. CrmAuth helps with authentication, CrmBaseHelper helps with querying CRM and CrmNameHelper helps with naming the typings.

Interpretation

Contains interpreters, which translate the actual type into an intermediate type, which the rest of the program uses.

CodeDom

Contains more elaborate functions than interpretation. Still translates the actual types into intermediate types.

Generation

Contains a mix of functions, will be renamed to logic. Uses the functions to actually get the metadata and generate the typings.

Commandline

Contains the functions necessary to handle commandline arguments in a maintainable fashion.