Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ public static class Configuration
// ### Notice ### If the OData service requires authentication for accessing the metadata document, the value of
// MetadataDocumentUri has to be set to a local file path, or the client code generation process will fail.
public const string MetadataDocumentUri = "https://retail1611pu6c4dd29587c42e289devaos.cloudax.dynamics.com/data/$metadata";

// If you would like to save the defintion to the local project folder and avoid having to specify an absolute path
// simply set MetadataDocumentUri to null, and amend ProjectRelativeMetadataDocumentUri to hold the relative path
// to your metadata file. This is then resolved using Host.ResolvePath (see https://docs.microsoft.com/en-gb/visualstudio/modeling/t4-template-directive?view=vs-2015#hostspecific-attribute).
// If MetadataDocumentUri is not null, this value is ignored.
public const string ProjectRelativeMetadataDocumentUri = "metadata.xml";

// The use of DataServiceCollection enables entity and property tracking. The value must be set to true or false.
public const bool UseDataServiceCollection = true;
Expand Down Expand Up @@ -72,4 +78,4 @@ public static class Customization
return upperNamespace;
}
}
#>
#>
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public void ValidateAndSetIgnoreUnexpectedElementsAndAttributesFromString(string
/// </summary>
private void ApplyParametersFromConfigurationClass()
{
this.MetadataDocumentUri = Configuration.MetadataDocumentUri;
this.MetadataDocumentUri = Configuration.MetadataDocumentUri ?? Host.ResolvePath(Configuration.ProjectRelativeMetadataDocumentUri);
this.NamespacePrefix = Configuration.NamespacePrefix;
this.UseDataServiceCollection = Configuration.UseDataServiceCollection;
this.ValidateAndSetTargetLanguageFromString(Configuration.TargetLanguage);
Expand Down Expand Up @@ -5071,4 +5071,4 @@ End Namespace
<#+
}
}
#>
#>