@@ -10,9 +10,6 @@ namespace BootstrapBlazor.Server.Components.Samples;
1010/// </summary>
1111public partial class CodeEditors
1212{
13- [ NotNull ]
14- private ConsoleLogger ? Logger { get ; set ; }
15-
1613 [ NotNull ]
1714 private string ? Code { get ; set ; }
1815
@@ -76,15 +73,6 @@ void Main()
7673 return Task . CompletedTask ;
7774 }
7875
79- private Task OnValueChanged ( string ? value )
80- {
81- if ( ! string . IsNullOrEmpty ( value ) )
82- {
83- Logger . Log ( value ) ;
84- }
85- return Task . CompletedTask ;
86- }
87-
8876 private Task OnThemeSelectedItemChanged ( SelectedItem item )
8977 {
9078 if ( item . Value == "vs-dark" )
@@ -105,45 +93,44 @@ private Task OnThemeSelectedItemChanged(SelectedItem item)
10593 return Task . CompletedTask ;
10694 }
10795
108- private IEnumerable < AttributeItem > GetAttributeItems ( )
96+ private static List < AttributeItem > GetAttributeItems ( )
10997 {
110- return new List < AttributeItem > ( )
111- {
112- new AttributeItem ( )
113- {
114- Name = nameof ( CodeEditor . Value ) ,
115- Type = "string" ,
116- DefaultValue = "-" ,
117- Description = Localizer [ "Value" ]
118- } ,
119- new AttributeItem ( )
120- {
121- Name = nameof ( CodeEditor . Theme ) ,
122- Type = "string" ,
123- DefaultValue = "vs" ,
124- Description = Localizer [ "Theme" ]
125- } ,
126- new AttributeItem ( )
127- {
128- Name = nameof ( CodeEditor . Language ) ,
129- Type = "string" ,
130- DefaultValue = "csharp" ,
131- Description = Localizer [ "Language" ]
132- } ,
133- new AttributeItem ( )
134- {
135- Name = nameof ( CodeEditor . ValueChanged ) ,
136- Type = "EventCallback<string?>" ,
137- DefaultValue = "-" ,
138- Description = Localizer [ "ValueChanged" ]
139- } ,
140- new AttributeItem ( )
141- {
142- Name = nameof ( CodeEditor . OnValueChanged ) ,
143- Type = "Func<string?,Task>" ,
144- DefaultValue = "-" ,
145- Description = Localizer [ "ValueChanged" ]
146- } ,
147- } ;
98+ return [
99+ //new()
100+ //{
101+ // Name = nameof(CodeEditor.Value),
102+ // Type = "string",
103+ // DefaultValue = "-",
104+ // Description = Localizer["Value"]
105+ //},
106+ //new()
107+ //{
108+ // Name = nameof(CodeEditor.Theme),
109+ // Type = "string",
110+ // DefaultValue = "vs",
111+ // Description = Localizer["Theme"]
112+ //},
113+ //new()
114+ //{
115+ // Name = nameof(CodeEditor.Language),
116+ // Type = "string",
117+ // DefaultValue = "csharp",
118+ // Description = Localizer["Language"]
119+ //},
120+ //new()
121+ //{
122+ // Name = nameof(CodeEditor.ValueChanged),
123+ // Type = "EventCallback<string?>",
124+ // DefaultValue = "-",
125+ // Description = Localizer["ValueChanged"]
126+ //},
127+ //new()
128+ //{
129+ // Name = nameof(CodeEditor.OnValueChanged),
130+ // Type = "Func<string?,Task>",
131+ // DefaultValue = "-",
132+ // Description = Localizer["ValueChanged"]
133+ //}
134+ ] ;
148135 }
149136}
0 commit comments