strange behaviour calling method of wcf from powershell using new-webproxyservice

前端 未结 2 1632
自闭症患者
自闭症患者 2020-12-19 18:40

Can someone explain this to me:

I builded an really simple wcf service for testing purposes.
Consuming service from powershell using New-WebServiceProxy I found

2条回答
  •  Happy的楠姐
    2020-12-19 19:21

    finally I've discovered this:

    PS C:\ps> [int]$int = 0
    PS C:\ps> $bool = $true
    PS C:\ps> $a.DictionaryLength([ref]$int, [ref]$bool)
    PS C:\ps> $int
    61
    

    I've build a solution with .net 2.0 (powershell native framework) for a client application to consume my wfc (.net 4.0) and the definition for method DictionaryLegth() was:

    void myservice.DictionaryLength(out int DictyionaryLengthResult, out bool DictonaryLengthSpecified)
    

提交回复
热议问题