Added aliases for all missing types used in UI (#5743)

This commit is contained in:
raymonddenhaan 2024-07-10 18:38:11 +02:00 committed by GitHub
parent 59bc7bc6a2
commit c7b5caafdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 16 additions and 10 deletions

View file

@ -24,16 +24,17 @@ public class ExpressionOptions
this.AddTypeAlias<bool>("Boolean");
this.AddTypeAlias<decimal>("Decimal");
this.AddTypeAlias<double>("Double");
this.AddTypeAlias<byte[]>("ByteArray");
this.AddTypeAlias<Guid>("Guid");
this.AddTypeAlias<DateTime>("DateTime");
this.AddTypeAlias<DateTimeOffset>("DateTimeOffset");
this.AddTypeAlias<TimeSpan>("TimeSpan");
this.AddTypeAlias<ExpandoObject>("ExpandoObject");
this.AddTypeAlias<Stream>("Stream");
this.AddTypeAlias<ExpandoObject>("JSON");
this.AddTypeAlias<Dictionary<string, string>>("StringDictionary");
this.AddTypeAlias<IDictionary<string, string>>("StringDictionary");
this.AddTypeAlias<IDictionary<string, object>>("ObjectDictionary");
this.AddTypeAlias<Dictionary<string, string>>("StringMap");
this.AddTypeAlias<Dictionary<string, object>>("ObjectMap");
this.AddTypeAlias<Dictionary<string, object>>("ObjectDictionary");
}
/// Gets the type alias dictionary.

View file

@ -217,6 +217,11 @@ public class HttpFeature : FeatureBase
Services.Configure<ExpressionOptions>(options =>
{
options.AddTypeAlias<HttpRequest>("HttpRequest");
options.AddTypeAlias<HttpResponse>("HttpResponse");
options.AddTypeAlias<HttpResponseMessage>("HttpResponseMessage");
options.AddTypeAlias<HttpHeaders>("HttpHeaders");
options.AddTypeAlias<RouteData>("RouteData");
options.AddTypeAlias<IFormFile>("FormFile");
options.AddTypeAlias<IFormFile[]>("FormFile[]");
options.AddTypeAlias<HttpFile>("HttpFile");

View file

@ -4,5 +4,5 @@
"_island": "[\r\n {\r\n \u0022path\u0022: \u0022folder1\u0022,\r\n \u0022command\u0022: \u0022add\u0022\r\n }\r\n]",
"_type": "Newtonsoft.Json.Linq.JArray, Newtonsoft.Json"
},
"_type": "ObjectDictionary"
"_type": "ObjectMap"
}

View file

@ -6,5 +6,5 @@
"command": "add"
}
],
"_type": "ObjectDictionary"
"_type": "ObjectMap"
}

View file

@ -4,5 +4,5 @@
"_island": "{\r\n \u0022file1\u0022: {\r\n \u0022script\u0022: [\r\n {\r\n \u0022path\u0022: \u0022folder1\u0022,\r\n \u0022command\u0022: \u0022add\u0022\r\n }\r\n ]\r\n }\r\n}",
"_type": "Newtonsoft.Json.Linq.JObject, Newtonsoft.Json"
},
"_type": "ObjectDictionary"
"_type": "ObjectMap"
}

View file

@ -10,5 +10,5 @@
]
}
},
"_type": "ObjectDictionary"
"_type": "ObjectMap"
}

View file

@ -4,5 +4,5 @@
"_island": "[\r\n {\r\n \u0022path\u0022: \u0022folder1\u0022,\r\n \u0022command\u0022: \u0022add\u0022\r\n }\r\n]",
"_type": "System.Text.Json.Nodes.JsonArray, System.Text.Json"
},
"_type": "ObjectDictionary"
"_type": "ObjectMap"
}

View file

@ -4,5 +4,5 @@
"_island": "{\r\n \u0022file1\u0022: {\r\n \u0022script\u0022: [\r\n {\r\n \u0022path\u0022: \u0022folder1\u0022,\r\n \u0022command\u0022: \u0022add\u0022\r\n }\r\n ]\r\n }\r\n}",
"_type": "System.Text.Json.Nodes.JsonObject, System.Text.Json"
},
"_type": "ObjectDictionary"
"_type": "ObjectMap"
}

View file

@ -10,5 +10,5 @@
]
}
},
"_type": "ObjectDictionary"
"_type": "ObjectMap"
}