开发者

Update to Azure diagnostics: rolestatus and get health status

So I would like to know what the开发者_如何转开发 updated disgnostics are for RoleStatus and getHealthStatus() in Azure ?

Thanks Supraja J


From: http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleinstancestatuscheckeventargs.aspx

public override bool OnStart()
{
   RoleEnvironment.StatusCheck += RoleEnvironmentStatusCheck;
   return base.OnStart();
}

private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
{
   Trace.WriteLine("The status of the role instance: " + e.Status, "Information");
}

See also:

RoleInstanceStatusCheckEventArgs.SetBusy(): http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleinstancestatuscheckeventargs.setbusy.aspx

and

RoleEnvironment.RequestRecycle(): http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleenvironment.requestrecycle.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜