@@ -149,93 +149,6 @@ private static byte[] ConvertToHex(string data)
149149 return [ .. ret ] ;
150150 }
151151
152- /// <summary>
153- /// 获得属性方法
154- /// </summary>
155- /// <returns></returns>
156- private static AttributeItem [ ] GetAttributes ( ) =>
157- [
158- new ( )
159- {
160- Name = "OnReceive" ,
161- Description = "收到数据回调方法" ,
162- Type = "Func<string, Task>?" ,
163- ValueList = "-" ,
164- DefaultValue = "-"
165- } ,
166- new AttributeItem ( ) {
167- Name = "OnSignals" ,
168- Description = "收到信号数据回调方法" ,
169- Type = "Func<WebSerialSignals, Task>?" ,
170- ValueList = "-" ,
171- DefaultValue = "-"
172- } ,
173- new ( )
174- {
175- Name = "OnLog" ,
176- Description = "Log回调方法" ,
177- Type = "Func<string, Task>?" ,
178- ValueList = "-" ,
179- DefaultValue = "-"
180- } ,
181- new ( )
182- {
183- Name = "OnError" ,
184- Description = "错误回调方法" ,
185- Type = "Func<string, Task>?" ,
186- ValueList = "-" ,
187- DefaultValue = "-"
188- } ,
189- new ( )
190- {
191- Name = "Element" ,
192- Description = "UI界面元素的引用对象,为空则使用整个页面" ,
193- Type = "ElementReference" ,
194- ValueList = "-" ,
195- DefaultValue = "-"
196- } ,
197- new ( )
198- {
199- Name = "ConnectBtnTitle" ,
200- Description = "获得/设置 连接按钮文本" ,
201- Type = "string" ,
202- ValueList = "" ,
203- DefaultValue = "连接"
204- } ,
205- new ( )
206- {
207- Name = "DisconnectBtnTitle" ,
208- Description = "获得/设置 断开连接按钮文本" ,
209- Type = "string" ,
210- ValueList = "" ,
211- DefaultValue = "断开连接"
212- } ,
213- new ( )
214- {
215- Name = "WriteBtnTitle" ,
216- Description = "获得/设置 写入按钮文本" ,
217- Type = "string" ,
218- ValueList = "" ,
219- DefaultValue = "写入"
220- } ,
221- new ( )
222- {
223- Name = "ShowUI" ,
224- Description = "获得/设置 显示内置 UI" ,
225- Type = "bool" ,
226- ValueList = "True|False" ,
227- DefaultValue = "False"
228- } ,
229- new ( )
230- {
231- Name = "Debug" ,
232- Description = "获得/设置 显示 log" ,
233- Type = "bool" ,
234- ValueList = "True|False" ,
235- DefaultValue = "False"
236- }
237- ] ;
238-
239152 private async ValueTask DisposeAsync ( bool disposing )
240153 {
241154 if ( disposing )
0 commit comments