Rename GetData method to GetText across components.

This commit is contained in:
Thorsten Sommer 2024-08-18 14:58:45 +02:00
parent ffd02af5d0
commit a1eb975021
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
4 changed files with 4 additions and 4 deletions

View File

@ -168,7 +168,7 @@ public abstract partial class AssistantBase : ComponentBase
{
var contentToSend = sendToButton.UseResultingContentBlockData switch
{
false => sendToButton.GetData(),
false => sendToButton.GetText(),
true => this.resultingContentBlock?.Content switch
{
ContentText textBlock => textBlock.Text,

View File

@ -32,7 +32,7 @@ public partial class AssistantGrammarSpelling : AssistantBaseCore
{
Self = SendTo.GRAMMAR_SPELLING_ASSISTANT,
UseResultingContentBlockData = false,
GetData = () => string.IsNullOrWhiteSpace(this.correctedText) ? this.inputText : this.correctedText
GetText = () => string.IsNullOrWhiteSpace(this.correctedText) ? this.inputText : this.correctedText
},
];

View File

@ -33,7 +33,7 @@ public partial class AssistantRewriteImprove : AssistantBaseCore
{
Self = SendTo.REWRITE_ASSISTANT,
UseResultingContentBlockData = false,
GetData = () => string.IsNullOrWhiteSpace(this.rewrittenText) ? this.inputText : this.rewrittenText,
GetText = () => string.IsNullOrWhiteSpace(this.rewrittenText) ? this.inputText : this.rewrittenText,
},
];

View File

@ -6,7 +6,7 @@ public readonly record struct SendToButton() : IButtonData
{
public ButtonTypes Type => ButtonTypes.SEND_TO;
public Func<string> GetData { get; init; } = () => string.Empty;
public Func<string> GetText { get; init; } = () => string.Empty;
public bool UseResultingContentBlockData { get; init; } = true;