Spark 视图引擎中 { 之前的文字

发布于 2024-08-28 12:27:01 字数 305 浏览 14 评论 0原文

我正在浏览 spark view 引擎文档,发现代码中出现了很多文字,我对此找不到任何参考。例如

!#$!$ 、...

这些是做什么用的?这些组合意味着什么?它们什么时候开始使用?我是否遗漏了 { 之前或之后的任何文字

I was going through the spark view engine documentation and found a lot of literals showing up in code for which I couldn’t find any references. For e.g.

! , #, $ , !$ , ...

What are these for? What do the combinations mean? When do they come into use? Am I missing any more literals that precede or comes after {

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

私藏温柔 2024-09-04 12:27:01

还有 ?{ 用于条件输出

Also ?{ for conditional output.

耀眼的星火 2024-09-04 12:27:01

发现一:

如果您想确保表达式产生的任何 null 值和 NullReferenceException 根本不会产生任何输出,也可以使用语法 $!{expression}

Found one:

The syntax $!{expression} can also be used if you want to ensure any null values and NullReferenceException that result from the expression will produce no output at all.

小帐篷 2024-09-04 12:27:01

因此缺少的:

#:将其放在行的开头以在视图中插入内联 c# 代码(必须像任何 c# 语句一样以 ; 结束行

${}:希望你知道这一点;)

!{}:不进行 html 编码的内容输出(不安全输出)

So the missing ones:

#: put it at the beginning of a line to insert inline c# code in the view (you must end the line with ; like any c# statement

${}: hope you know that one ;)

!{}: output without html encode the content (unsafe output)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文