清单 Script.fsx:
#load "AccountDetails.fs"
#r @"..\packages\FSharpx.Core.1.4.120207\lib\FSharpx.Async.dll"
#r @"C:\Program Files\Windows Azure SDK\v1.6\ServiceBus\ref\Microsoft.ServiceBus.dll"
#load "AzureServiceBus.fs"
open AccountDetails
open FSharp.Control
open Microsoft.ServiceBus
open Microsoft.ServiceBus.Messaging
// Let's do some service bus hacking
let tp = TokenProvider.CreateSharedSecretTokenProvider(issuer_name, key)
let asb_uri = ServiceBusEnvironment.CreateServiceUri("sb", ns, "")
let mf = MessagingFactory.Create(asb_uri, tp)
let nm = NamespaceManager(asb_uri, NamespaceManagerSettings(TokenProvider = tp))
module Queue =
let queueDescription name = async {
let! exists = Async.FromBeginEnd(name, nm.BeginQueueExists, nm.EndQueueExists)
return! if exists then Async.FromBeginEnd(name, nm.BeginGetQueue, nm.EndGetQueue)
else Async.FromBeginEnd(name, nm.BeginCreateQueue, nm.EndCreateQueue)
}
我收到了这个错误:Script.fsx(22,43): error FS0503: The member or object constructor 'BeginCreateQueue' taking 3 arguments are not accessible from this code location. All accessible versions of method 'BeginCreateQueue' take 3 arguments.
所以它告诉我带有 3 个参数的方法是不可访问的,但是有一个带有 3 个参数的可访问版本?