Here are a few snippets from the solution that the template creates:
IService1.fs
namespace FSharpWcfServiceApplicationTemplate.Contracts
open System.Runtime.Serialization
open System.ServiceModel
[<ServiceContract>]
type IService1 =
[<OperationContract>]
abstract GetData: value:int -> string
[<OperationContract>]
abstract GetDataUsingDataContract: composite:CompositeType -> CompositeType
Service1.fsnamespace FSharpWcfServiceApplicationTemplate
open System
open FSharpWcfServiceApplicationTemplate.Contracts
type Service1() =
interface IService1 with
member x.GetData value =
sprintf "%A" value
member x.GetDataUsingDataContract composite =
match composite.BoolValue with
| true -> composite.StringValue <-
sprintf "%A%A" composite.StringValue "Suffix"
| _ -> "do nothing" |> ignore
composite
You can download the installer from here and get the full source from http://github.com/dmohl/FSharpWcfServiceApplicationExample.
No comments:
Post a Comment