| | 1 | | using System.Reflection; |
| | 2 | | using Kestrun.Scripting; |
| | 3 | |
|
| | 4 | | namespace Kestrun.Authentication; |
| | 5 | |
|
| | 6 | | /// <summary> |
| | 7 | | /// Represents the settings for authentication code, including language, code, extra imports, and references. |
| | 8 | | /// </summary> |
| | 9 | | public record AuthenticationCodeSettings |
| | 10 | | { |
| | 11 | | /// <summary> |
| | 12 | | /// Gets the scripting language used for authentication code. |
| | 13 | | /// </summary> |
| 38 | 14 | | public ScriptLanguage Language { get; init; } = ScriptLanguage.Native; |
| | 15 | | /// <summary> |
| | 16 | | /// Gets the authentication code as a string. |
| | 17 | | /// </summary> |
| 69 | 18 | | public string? Code { get; init; } |
| | 19 | | /// <summary> |
| | 20 | | /// Gets the extra import namespaces required for authentication code. |
| | 21 | | /// </summary> |
| 22 | 22 | | public string[]? ExtraImports { get; init; } |
| | 23 | | /// <summary> |
| | 24 | | /// Gets the extra assembly references required for authentication code. |
| | 25 | | /// </summary> |
| 21 | 26 | | public Assembly[]? ExtraRefs { get; init; } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Gets the C# language version used for authentication code. |
| | 30 | | /// If the language is CSharp. |
| | 31 | | /// </summary> |
| | 32 | | /// <remarks> |
| | 33 | | /// This property is used to specify the C# language version for the authentication code. |
| | 34 | | /// </remarks> |
| 180 | 35 | | public Microsoft.CodeAnalysis.CSharp.LanguageVersion CSharpVersion { get; init; } = Microsoft.CodeAnalysis.CSharp.La |
| | 36 | |
|
| | 37 | | /// <summary> |
| | 38 | | /// Gets the Visual Basic language version used for authentication code. |
| | 39 | | /// If the language is VBNet. |
| | 40 | | /// </summary> |
| | 41 | | /// <remarks> |
| | 42 | | /// This property is used to specify the Visual Basic language version for the authentication code. |
| | 43 | | /// </remarks> |
| 181 | 44 | | public Microsoft.CodeAnalysis.VisualBasic.LanguageVersion VisualBasicVersion { get; init; } = Microsoft.CodeAnalysis |
| | 45 | | } |