GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
Loading...
Searching...
No Matches
Attributes.cs
1// =============================================================================
2// GPAL - Generally Positive Automation Library
3// Copyright © 2026 Software Decisions, Inc. All rights reserved.
4//
5// This file is part of GPAL.
6// Licensed under the Business Source License 1.1
7//
8// Primary development, architecture, and vision by Michael B. Vederman,
9// CEO of Software Decisions, Inc., Texas.
10//
11// Internal development maintained privately.
12// Public releases appear on GitHub: https://github.com/SoftwareDecisionsInc/GPAL.
13//
14// See LICENSE for full terms, including Additional Use Grant.
15// =============================================================================
16
17using System;
18
19namespace GenerallyPositive
20{
21 [AttributeUsage(AttributeTargets.All, Inherited = true)]
22 public class GPALAttribute : Attribute
23 {
24 public string Description { get; set; }
25 public string MethodName { get; set; } = null;
26 public GPALAttribute(string Description = "")
27 {
28 this.Description = Description;
29 }
30 }
31 [AttributeUsage(AttributeTargets.All, Inherited = true)]
32 class SingleUseAttribute : GPALAttribute
33 {
34 public SingleUseAttribute(string Description = "")
35 {
36 this.Description = Description;
37 }
38 }
39 #region GPAL Menu Names
40 [AttributeUsage(AttributeTargets.All, Inherited = true)]
41 class DataAttribute : GPALAttribute
42 {
43 public DataAttribute(string Description = "")
44 {
45 this.Description = Description;
46 }
47 }
48 [AttributeUsage(AttributeTargets.All, Inherited = true)]
49 class CallbackAttribute : GPALAttribute
50 {
51 public CallbackAttribute(string Description = "")
52 {
53 this.Description = Description;
54 }
55 }
56 [AttributeUsage(AttributeTargets.All, Inherited = true)]
57 class BrowserAttribute : GPALAttribute
58 {
59 public BrowserAttribute(string Description = "")
60 {
61 this.Description = Description;
62 }
63 }
64 [AttributeUsage(AttributeTargets.All, Inherited = true)]
65 class ActionAttribute : GPALAttribute
66 {
67 public ActionAttribute(string Description = "")
68 {
69 this.Description = Description;
70 }
71 }
72 [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Method, Inherited = true)]
73 class HelperAttribute : GPALAttribute
74 {
75 public HelperAttribute(string Description="")
76 {
77 this.Description = Description;
78 }
79 }
80 [AttributeUsage(AttributeTargets.All)]
81 class FluentAttribute : GPALAttribute
82 {
83 public FluentAttribute(string Description = "")
84 {
85 this.Description = Description;
86 }
87 }
88 [AttributeUsage(AttributeTargets.All)]
89 class SettingsAttribute : GPALAttribute
90 {
91 public SettingsAttribute(string Description = "")
92 {
93 this.Description = Description;
94 }
95 }
96 [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Method, Inherited = true)]
97 class GPALSettingsAttribute : GPALAttribute
98 {
99 public GPALSettingsAttribute(string Description = "")
100 {
101 this.Description = Description;
102 }
103 }
104 [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Method, Inherited = true)]
105 class ModifierAttribute : GPALAttribute
106 {
107 public ModifierAttribute(string Description = "")
108 {
109 this.Description = Description;
110 }
111 }
112 [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Method, Inherited = true)]
113 class ConstantAttribute : GPALAttribute
114 {
115 public ConstantAttribute(string Description = "")
116 {
117 this.Description = Description;
118 }
119 }
120 [AttributeUsage(AttributeTargets.All)]
121 class FormsAttribute : GPALAttribute
122 {
123 public FormsAttribute(string Description = "")
124 {
125 this.Description = Description;
126 }
127 }
128 [AttributeUsage(AttributeTargets.All)]
129 class ComponentAttribute : GPALAttribute
130 {
131 public ComponentAttribute(string Description = "")
132 {
133 this.Description = Description;
134 }
135 }
136 [AttributeUsage(AttributeTargets.All)]
137 class ElementAssitantAttribute : GPALAttribute
138 {
139 public ElementAssitantAttribute(string Description = "")
140 {
141 this.Description = Description;
142 }
143 }
144 [AttributeUsage(AttributeTargets.All)]
145 class KeysAttribute : GPALAttribute
146 {
147 public KeysAttribute(string Description = "")
148 {
149 this.Description = Description;
150 }
151 }
152 [AttributeUsage(AttributeTargets.All)]
153 class FileAttribute : GPALAttribute
154 {
155 public FileAttribute(string Description = "")
156 {
157 this.Description = Description;
158 }
159 }
160 [AttributeUsage(AttributeTargets.All)]
161 class ScrollAttribute : GPALAttribute
162 {
163 public ScrollAttribute(string Description = "")
164 {
165 this.Description = Description;
166 }
167 }
168 [AttributeUsage(AttributeTargets.All)]
169 class WaitAttribute : GPALAttribute
170 {
171 public WaitAttribute(string Description = "")
172 {
173 this.Description = Description;
174 }
175 }
176 [AttributeUsage(AttributeTargets.All)]
177 class WorkflowAttribute : GPALAttribute
178 {
179 public WorkflowAttribute(string Description = "")
180 {
181 this.Description = Description;
182 }
183 }
184
185 #endregion GPAL Menu Names
186
187 #region Parameter Attributes
188 // Parameter attributes, to know how to deal with entering them via the studio
189 [AttributeUsage(AttributeTargets.All, Inherited = true)]
190 class EnumAttribute : GPALAttribute
191 {
192
193 public EnumAttribute(string Description = "In GPAL Studio, present menu of enum names")
194 {
195 this.Description = Description;
196 }
197 }
198 [AttributeUsage(AttributeTargets.All, Inherited = true)]
199 class DirectoryAttribute : GPALAttribute
200 {
201
202 public DirectoryAttribute(string Description = "")
203 {
204 this.Description = Description;
205 }
206 }
207 [AttributeUsage(AttributeTargets.All, Inherited = true)]
208 class IntAttribute : GPALAttribute
209 {
210
211 public IntAttribute(string Description = "")
212 {
213 this.Description = Description;
214 }
215 }
216 [AttributeUsage(AttributeTargets.All, Inherited = true)]
217 class URLAttribute : GPALAttribute
218 {
219
220 public URLAttribute(string Description = "")
221 {
222 this.Description = Description;
223 }
224 }
225 [AttributeUsage(AttributeTargets.All, Inherited = true)]
226 class GPALFileAttribute : GPALAttribute
227 {
228
229 public GPALFileAttribute(string Description = "")
230 {
231 this.Description = Description;
232 }
233 }
234 [AttributeUsage(AttributeTargets.All, Inherited = true)]
235 class SelectorAttribute : GPALAttribute
236 {
237
238 public SelectorAttribute(string Description = "")
239 {
240 this.Description = Description;
241 }
242 }
243 [AttributeUsage(AttributeTargets.All, Inherited = true)]
244 class BrowserTypeAttribute : GPALAttribute
245 {
246
247 public BrowserTypeAttribute(string Description = "")
248 {
249 this.Description = Description;
250 }
251 }
252 #endregion Parameter Attributes
253 #region Interface Attribute // the title of the dynamic dialog built to enter data for an interface (ie, IAllowSelectorSettings)
254 class InterfaceAttribute : GPALAttribute
255 {
256 public InterfaceAttribute(string Description = "")
257 {
258 this.Description = Description;
259 }
260 }
261 #endregion Interface Attribute
262 #region SelectorSet Attributes
263 // Parameter attributes, to know how to deal with entering them via the studio
264 [AttributeUsage(AttributeTargets.All, Inherited = true)]
265 public class WithCSS : GPALAttribute
266 {
267
268 public WithCSS(string Description = "Method name used to handle css value")
269 {
270 this.Description = Description;
271 this.MethodName = "WithCSS";
272 }
273 }
274
275 [AttributeUsage(AttributeTargets.All, Inherited = true)]
276 public class WithXPath : GPALAttribute
277 {
278
279 public WithXPath(string Description = "Method name used to handle x path")
280 {
281 this.Description = Description;
282 this.MethodName = "WithXPath";
283 }
284 }
285
286 [AttributeUsage(AttributeTargets.All, Inherited = true)]
287 public class WithValue : GPALAttribute
288 {
289
290 public WithValue(string Description = "")
291 {
292 this.Description = Description;
293 this.MethodName = "WithValue";
294 }
295 }
296
297 [AttributeUsage(AttributeTargets.All, Inherited = true)]
298 public class MatchValue : GPALAttribute
299 {
300
301 public MatchValue(string Description = "")
302 {
303 this.Description = Description;
304 this.MethodName = "MatchValue";
305 }
306 }
307
308 [AttributeUsage(AttributeTargets.All, Inherited = true)]
309 public class WithText : GPALAttribute
310 {
311
312 public WithText(string Description = "")
313 {
314 this.Description = Description;
315 this.MethodName = "WithText";
316 }
317 }
318
319 [AttributeUsage(AttributeTargets.All, Inherited = true)]
320 public class MatchText : GPALAttribute
321 {
322
323 public MatchText(string Description = "")
324 {
325 this.Description = Description;
326 this.MethodName = "MatchText";
327 }
328 }
329
330 [AttributeUsage(AttributeTargets.All, Inherited = true)]
331 public class MatchSrc : GPALAttribute
332 {
333
334 public MatchSrc(string Description = "")
335 {
336 this.Description = Description;
337 this.MethodName = "MatchSrc";
338 }
339 }
340
341 [AttributeUsage(AttributeTargets.All, Inherited = true)]
342 public class MatchHRef : GPALAttribute
343 {
344
345 public MatchHRef(string Description = "")
346 {
347 this.Description = Description;
348 this.MethodName = "MatchHRef";
349 }
350 }
351
352 [AttributeUsage(AttributeTargets.All, Inherited = true)]
353 public class MatchPlaceholder : GPALAttribute
354 {
355
356 public MatchPlaceholder(string Description = "")
357 {
358 this.Description = Description;
359 this.MethodName = "MatchPlaceholder";
360 }
361 }
362
363 [AttributeUsage(AttributeTargets.All, Inherited = true)]
364 public class WithSelectorName : GPALAttribute
365 {
366
367 public WithSelectorName(string Description = "")
368 {
369 this.Description = Description;
370 this.MethodName = "WithSelectorName";
371 }
372 }
373
374 [AttributeUsage(AttributeTargets.All, Inherited = true)]
375 public class WithOffsetX : GPALAttribute
376 {
377
378 public WithOffsetX(string Description = "")
379 {
380 this.Description = Description;
381 this.MethodName = "WithOffsetX";
382 }
383 }
384
385 [AttributeUsage(AttributeTargets.All, Inherited = true)]
386 public class WithOffsetY : GPALAttribute
387 {
388
389 public WithOffsetY(string Description = "")
390 {
391 this.Description = Description;
392 this.MethodName = "WithOffsetY";
393 }
394 }
395
396 [AttributeUsage(AttributeTargets.All, Inherited = true)]
397 public class WithDeltaX : GPALAttribute
398 {
399
400 public WithDeltaX(string Description = "")
401 {
402 this.Description = Description;
403 this.MethodName = "WithDeltaX";
404 }
405 }
406
407 [AttributeUsage(AttributeTargets.All, Inherited = true)]
408 public class WithDeltaY : GPALAttribute
409 {
410
411 public WithDeltaY(string Description = "")
412 {
413 this.Description = Description;
414 this.MethodName = "WithDeltaY";
415 }
416 }
417
418 [AttributeUsage(AttributeTargets.All, Inherited = true)]
419 public class WithImage : GPALAttribute
420 {
421
422 public WithImage(string Description = "")
423 {
424 this.Description = Description;
425 this.MethodName = "WithImage";
426 }
427 }
428
429 #endregion SelectorSet Attributes
430 #region Puppeteer Communicator Command Attributes
431 [AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
432 public sealed class CommandAttribute : Attribute
433 {
434 public string CommandString { get; }
435
436 public CommandAttribute(string commandString)
437 {
438 CommandString = commandString;
439 }
440 }
441 #endregion Puppeteer Communicator CommandAttributes
442 #region Experimental Attribute - designate features not completely developed
443 [AttributeUsage(AttributeTargets.All, Inherited = true)]
444 class InProgressAttribute : GPALAttribute
445 {
446 public InProgressAttribute(string Description = "")
447 {
448 this.Description = Description;
449 }
450 }
451 #endregion Experimental Attribute - designate features not completely developed
452}
453