/AzureSamples/Fabric/FsHelloFabric_WorkerRole/WorkerRole.fs
# · F# · 26 lines · 20 code · 6 blank · 0 comment · 0 complexity · 34a058725f66bae7553e53c2408ac632 MD5 · raw file
- namespace Microsoft.Samples.ServiceHosting.HelloFabric
-
- open System
- open System.Diagnostics
- open System.Threading
- open Microsoft.Samples.ServiceHosting.HelloFabric
- open Microsoft.WindowsAzure.Diagnostics
- open Microsoft.WindowsAzure.ServiceRuntime
- type WorkerRole() =
- inherit RoleEntryPoint()
-
- override wr.OnStart() =
- DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString") |> ignore
- base.OnStart()
-
- override wr.Run() =
- let dayTimerServer = new DayTimeTcpServer(RoleEnvironment.CurrentRoleInstance.InstanceEndpoints.["DayTime"].IPEndpoint)
- dayTimerServer.Start()
-
- let mutable count = 0
-
- while(true) do
- count <- count + 1
- Trace.WriteLine(String.Format("Message %d",count))
- Thread.Sleep(TimeSpan.FromSeconds(10.0))