-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include sample-gen by default when generating sdk code (mgmt) (#3673)
* update to use testmodeler2.6.1 * Include sample-gen in when generating code * fix some naming * fix test project * fix path format * avoid include original file for MgmtMockAndSample project --------- Co-authored-by: Arthur Ma <arthurma@microsoft.com>
- Loading branch information
1 parent
f529082
commit 4d25396
Showing
12 changed files
with
212 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Threading.Tasks; | ||
using AutoRest.CSharp.AutoRest.Communication; | ||
|
||
namespace AutoRest.CSharp.Common.Utilities | ||
{ | ||
internal static class AutoRestLogger | ||
{ | ||
private static IPluginCommunication? _autoRest = null; | ||
public static void Initialize(IPluginCommunication autoRest) | ||
{ | ||
_autoRest = autoRest; | ||
} | ||
|
||
public static bool IsInitialized => _autoRest != null; | ||
|
||
public static async Task Warning(string message) | ||
{ | ||
if (!IsInitialized) | ||
throw new InvalidOperationException("AutoRestLogger.Warning is called before initialized"); | ||
await _autoRest!.Warning(message); | ||
} | ||
|
||
public static async Task Fatal(string message) | ||
{ | ||
if (!IsInitialized) | ||
throw new InvalidOperationException("AutoRestLogger.Fatal is called before initialized"); | ||
await _autoRest!.Fatal(message); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.