// Create a new corpus object CdmCorpusDefinition corpus = new CdmCorpusDefinition(); // Load a manifest from disk CdmManifestDefinition manifest = await corpus.FetchObjectAsync("path/to/manifest.json"); // Retrieve an entity from the manifest CdmEntityDefinition entity = await corpus.FetchObjectAsync (manifest.Entities[0].EntityPath, manifest);
// Create a new corpus object CdmCorpusDefinition corpus = new CdmCorpusDefinition(); // Load a trait definition from a model.json file CdmTraitDefinition traitDefinition = await corpus.FetchObjectAsyncIn both examples, the FetchObjectAsync method is used to retrieve a specific CDM object (entity or trait definition) from a corpus. The first example demonstrates how to retrieve an entity from a manifest, while the second example shows how to retrieve a trait definition from a model file. The FetchObjectAsync method takes two parameters: the first is the path to the CDM object, and the second is the reference to the parent object (if applicable).("model.json", "core/applicationCommon/foundationCommon/cdm/foundation.cdm.json");