Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
scriptstack [2025/12/30 17:40] admin [Models] |
scriptstack [2025/12/30 17:42] (aktuell) admin [Models] |
||
|---|---|---|---|
| Zeile 226: | Zeile 226: | ||
| using ScriptStack.Runtime; | using ScriptStack.Runtime; | ||
| using System; | using System; | ||
| - | //using System.Collections; | ||
| - | using System.Collections.Generic; | ||
| - | using System.Collections.ObjectModel; | ||
| - | using System.Data; | ||
| - | using System.Data.Common; | ||
| - | using System.Linq; | ||
| - | using System.Reflection; | ||
| namespace ScriptStack { | namespace ScriptStack { | ||
| public class Example: Model { | public class Example: Model { | ||
| + | | ||
| private static ReadOnlyCollection < Routine > exportedRoutines; | private static ReadOnlyCollection < Routine > exportedRoutines; | ||
| - | |||
| - | private static readonly object _lock = new object(); | ||
| - | private static int _nextHandle = 1; | ||
| - | |||
| - | // Handle -> Connection | ||
| - | private static readonly Dictionary < int, DbConnection > _conns = new Dictionary < int, DbConnection > (); | ||
| public Example() { | public Example() { | ||
| Zeile 250: | Zeile 238: | ||
| return; | return; | ||
| - | var r = new List < Routine > (); | + | var r = new List< |
| r.Add(new Routine(typeof (bool), " | r.Add(new Routine(typeof (bool), " | ||
| Zeile 262: | Zeile 250: | ||
| public ReadOnlyCollection < Routine > Routines => exportedRoutines; | public ReadOnlyCollection < Routine > Routines => exportedRoutines; | ||
| - | public object Invoke(string | + | public object Invoke(string |
| - | if (strFunctionName | + | if (routine |
| - | System.Console.Write(listParameters[0]); | + | System.Console.Write(parameters[0]); |
| return true; | return true; | ||
| } | } | ||
| - | if (strFunctionName | + | if (routine |
| return (int) System.Console.ReadKey().Key; | return (int) System.Console.ReadKey().Key; | ||
| - | if (strFunctionName | + | if (routine |
| return System.Console.ReadLine(); | return System.Console.ReadLine(); | ||