-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Take TFM into account in build tasks
When preprocessing templates in VS and targeting .NET Core, generate code that doesn't use remoting APIs. This is a quick and dirty approach so the APIs are internal for now. We need a more thorough overhaul of codegen amd runtime options at some point.
- Loading branch information
Showing
10 changed files
with
77 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Mono.TextTemplating/Mono.TextTemplating/CodeGenerationOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Mono.TextTemplating; | ||
|
||
/// <summary> | ||
/// Controls what code is generated by the template. | ||
/// Internal for now, until we have a better idea of what the API should look like. | ||
/// </summary> | ||
class CodeGenerationOptions | ||
{ | ||
/// <summary> | ||
/// Whether to use System.Runtime.Remoting.Messaging.CallContext | ||
/// </summary> | ||
public bool UseRemotingCallContext { get; set; } | ||
} |
13 changes: 13 additions & 0 deletions
13
Mono.TextTemplating/Mono.TextTemplating/ISupportCodeGenerationOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Mono.TextTemplating; | ||
|
||
/// <summary> | ||
/// Implemented by directives that support code generation options. | ||
/// Internal for now, until we have a better idea of what the API should look like. | ||
/// </summary> | ||
interface ISupportCodeGenerationOptions | ||
{ | ||
void SetCodeGenerationOptions (CodeGenerationOptions options); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters