2using System.Text.RegularExpressions;
7 static Regex
m_regEx =
new(
"\\%([A-Za-z0-9_\\-\\.\\/\\^]+)\\%", RegexOptions.Compiled);
15 string value = match.Groups[1].Value;
17 if (databaseObject !=
null) {
19 return databaseObject.
Value;
21 return databaseObject.
Name;
23 return $
"%'{value}' not found%";
28 string value2 = m.Groups[1].Value;
30 return databaseObject2 !=
null
32 : $
"%'{value2}' not found%";
38 if (reference.Length == 36
39 && reference[8] ==
'-'
40 && reference[13] ==
'-'
41 && reference[18] ==
'-'
42 && reference[23] ==
'-') {
43 Guid guid =
new(reference);
46 if (reference.Contains(
"/")
47 || reference.Contains(
".")
48 || reference.Contains(
"^")) {
49 string[] array = reference.Split([
'/'], StringSplitOptions.RemoveEmptyEntries);
51 while (context !=
null
52 && num < array.Length) {
53 string text = array[num];
58 else if (text.StartsWith(
"...")) {
59 string text2 = text.Substring(3);
60 if (
string.IsNullOrEmpty(text2)) {
64 while (context !=
null
70 else if (text ==
"^^") {
74 if (!text.StartsWith(
"^^^")) {
77 string text3 = text.Substring(3);
78 if (
string.IsNullOrEmpty(text3)) {
82 while (context !=
null
93 while (context !=
null) {
95 if (databaseObject !=
null) {
96 return databaseObject;
static string ConvertToString(object value)
DatabaseObject FindDatabaseObject(Guid guid, DatabaseObjectType type, bool throwIfNotFound)
DatabaseObject FindEffectiveNestedChild(string name, DatabaseObjectType type, bool directChildrenOnly, bool throwIfNotFound)
DatabaseObject EffectiveInheritanceParent
DatabaseObject NestingParent
DatabaseObject NestingRoot
DatabaseObject EffectiveInheritanceRoot
static DatabaseObject ResolveReference(DatabaseObject context, string reference)
object Parse(DatabaseObject context)