.net 如何读取方法签名?

.net 如何读取方法签名?,.net,powershell,neo4j,neo4jclient,.net,Powershell,Neo4j,Neo4jclient,如果我查看Return方法可用的重载,我可以这样做: [System.Reflection.Assembly]::LoadFrom("C:\...\Newtonsoft.Json.6.0.3\lib\net40\NewtonSoft.Json.dll") [System.Reflection.Assembly]::LoadFrom("C:\...\Neo4jClient.1.0.0.662\lib\net40\Neo4jClient.dll") $neo

如果我查看
Return
方法可用的重载,我可以这样做:

[System.Reflection.Assembly]::LoadFrom("C:\...\Newtonsoft.Json.6.0.3\lib\net40\NewtonSoft.Json.dll")
[System.Reflection.Assembly]::LoadFrom("C:\...\Neo4jClient.1.0.0.662\lib\net40\Neo4jClient.dll")

$neo = new-object Neo4jClient.GraphClient(new-object Uri("http://localhost:7474/db/data"))
$q=$neo.Cypher.Match("n").Return({param($m) $m});
$neo.Cypher.Match("n").Return.OverloadDefinitions
我看到这样的情况:

[System.Reflection.Assembly]::LoadFrom("C:\...\Newtonsoft.Json.6.0.3\lib\net40\NewtonSoft.Json.dll")
[System.Reflection.Assembly]::LoadFrom("C:\...\Neo4jClient.1.0.0.662\lib\net40\Neo4jClient.dll")

$neo = new-object Neo4jClient.GraphClient(new-object Uri("http://localhost:7474/db/data"))
$q=$neo.Cypher.Match("n").Return({param($m) $m});
$neo.Cypher.Match("n").Return.OverloadDefinitions
Neo4jClient.Cypher.ICypherFluentQuery[TResult]返回[TResult](字符串标识)

Neo4jClient.Cypher.ICypherFluentQuery[TResult]返回[TResult](System.Linq.Expressions.Expression[System.Func[TResult]]Expression)

Neo4jClient.Cypher.ICypherFluentQuery[TResult]返回[TResult](System.Linq.Expressions.Expression[System.Func[Neo4jClient.Cypher.ICypherResultItem,TResult]]表达式)

从中我了解到第一个重载采用单个字符串参数,但是,如何读取第二个重载?它采用linq表达式,该表达式[包含|接受]一个无参数函数,该函数返回type
TResult

第三个呢,函数有两个参数?它是两个参数还是一个参数和一个返回类型


如何阅读此语法?

应以可读的方式提供签名。

应以可读的方式提供签名。

应以可读的方式提供签名。

应以可读的方式提供签名。

因此,答案的一部分是,输出将替换法线角度方括号中的括号,因此:

Neo4jClient.Cypher.ICypherFluentQuery[TResult] Return[TResult](string identity)
实际上应该是这样的:

Neo4jClient.Cypher.ICypherFluentQuery<TResult> Return<TResult>(string identity)
Neo4jClient.Cypher.ICypherFluentQuery返回(字符串标识)
所以现在很清楚,这些都是泛型(请参阅:)

也就是说:

System.Linq.Expressions.Expression<System.Func<TResult>>
System.Linq.Expressions.Expression

表示作为返回
TResult

的函数键入的linq表达式,因此答案的一部分是输出用方括号替换正常的尖括号,因此:

Neo4jClient.Cypher.ICypherFluentQuery[TResult] Return[TResult](string identity)
实际上应该是这样的:

Neo4jClient.Cypher.ICypherFluentQuery<TResult> Return<TResult>(string identity)
Neo4jClient.Cypher.ICypherFluentQuery返回(字符串标识)
所以现在很清楚,这些都是泛型(请参阅:)

也就是说:

System.Linq.Expressions.Expression<System.Func<TResult>>
System.Linq.Expressions.Expression

表示作为返回
TResult

的函数键入的linq表达式,因此答案的一部分是输出用方括号替换正常的尖括号,因此:

Neo4jClient.Cypher.ICypherFluentQuery[TResult] Return[TResult](string identity)
实际上应该是这样的:

Neo4jClient.Cypher.ICypherFluentQuery<TResult> Return<TResult>(string identity)
Neo4jClient.Cypher.ICypherFluentQuery返回(字符串标识)
所以现在很清楚,这些都是泛型(请参阅:)

也就是说:

System.Linq.Expressions.Expression<System.Func<TResult>>
System.Linq.Expressions.Expression

表示作为返回
TResult

的函数键入的linq表达式,因此答案的一部分是输出用方括号替换正常的尖括号,因此:

Neo4jClient.Cypher.ICypherFluentQuery[TResult] Return[TResult](string identity)
实际上应该是这样的:

Neo4jClient.Cypher.ICypherFluentQuery<TResult> Return<TResult>(string identity)
Neo4jClient.Cypher.ICypherFluentQuery返回(字符串标识)
所以现在很清楚,这些都是泛型(请参阅:)

也就是说:

System.Linq.Expressions.Expression<System.Func<TResult>>
System.Linq.Expressions.Expression

表示作为函数键入的linq表达式,该函数返回
TResult

重载定义
只是方法签名。如果需要更多信息,请查阅Neo4jClient程序集的文档。
OverloadDefinitions
只是方法签名。如果需要更多信息,请查阅Neo4jClient程序集的文档。
OverloadDefinitions
只是方法签名。如果需要更多信息,请查阅Neo4jClient程序集的文档。
OverloadDefinitions
只是方法签名。如果需要更多信息,请查阅Neo4jClient程序集的文档。。。因此,普通符号的尖括号被方括号取代,以表示泛型。。。事实上,这个问题是由另一个问题引发的:也许你能回答吗?啊。。。因此,普通符号的尖括号被方括号取代,以表示泛型。。。事实上,这个问题是由另一个问题引发的:也许你能回答吗?啊。。。因此,普通符号的尖括号被方括号取代,以表示泛型。。。事实上,这个问题是由另一个问题引发的:也许你能回答吗?啊。。。因此,普通符号的尖括号被方括号取代,以表示泛型。。。事实上,这个问题是由另一个问题引发的:也许你能回答?