Skip to content

Instantly share code, notes, and snippets.

@valerysntx
Created November 10, 2015 11:10
Show Gist options
  • Select an option

  • Save valerysntx/bddc789067567e01fbb8 to your computer and use it in GitHub Desktop.

Select an option

Save valerysntx/bddc789067567e01fbb8 to your computer and use it in GitHub Desktop.
matchoperatorequivalentincs.fs
member x.ToMsmqQueuePath() =
match x with
| LocalName(hostName, queueName)-> (sprintf @".\private$\%s" queueName)
| IPAddress(hostName, queueName)-> (sprintf @"FormatName:DIRECT=TCP:%s\private$\%s" hostName queueName)
| Multicast(hostName, port)-> (sprintf @"FormatName:MULTICAST=%s:%i" hostName port)
| MachineId(hostName, queueName)-> (sprintf @"FormatName:PRIVATE=%s\%s" hostName queueName)
| _-> (sprintf @"FormatName:DIRECT=OS:%s\private$\%s" x.Host(getQueueName x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment