Ejemplo n.º 1
0
        private static unsafe NodeHealth FromNative(NativeTypes.FABRIC_NODE_HEALTH *nativeHealth)
        {
            var managedHealth = new NodeHealth();

            managedHealth.AggregatedHealthState = (HealthState)nativeHealth->AggregatedHealthState;
            managedHealth.HealthEvents          = HealthEvent.FromNativeList(nativeHealth->HealthEvents);
            managedHealth.NodeName = NativeTypes.FromNativeString(nativeHealth->NodeName);

            if (nativeHealth->Reserved != IntPtr.Zero)
            {
                var nativeHealthEx1 = (NativeTypes.FABRIC_NODE_HEALTH_EX1 *)nativeHealth->Reserved;
                managedHealth.UnhealthyEvaluations = HealthEvaluation.FromNativeList(nativeHealthEx1->UnhealthyEvaluations);
            }

            return(managedHealth);
        }
Ejemplo n.º 2
0
 internal NodeHealth(System.Fabric.Health.NodeHealth health) : base(health)
 {
     this.NodeName = health.NodeName;
 }