Ejemplo n.º 1
0
        internal static bool AreEqual(ApplicationTypeHealthPolicyMap current, ApplicationTypeHealthPolicyMap other)
        {
            if ((current != null) && (other != null))
            {
                bool equals = (current.Count == other.Count);

                if (!equals)
                {
                    return(false);
                }

                foreach (var currentItem in current)
                {
                    byte otherValue;
                    if (!other.TryGetValue(currentItem.Key, out otherValue))
                    {
                        return(false);
                    }

                    equals = (currentItem.Value == otherValue);
                    if (!equals)
                    {
                        return(false);
                    }
                }

                return(true);
            }
            else
            {
                return((current == null) && (other == null));
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// <para>Initializes a new instance of the <see cref="System.Fabric.Health.ClusterHealthPolicy" /> class.</para>
 /// </summary>
 /// <remarks>By default, no errors or warnings are tolerated.</remarks>
 public ClusterHealthPolicy()
 {
     this.considerWarningAsError          = false;
     this.maxPercentUnhealthyNodes        = 0;
     this.maxPercentUnhealthyApplications = 0;
     this.applicationTypeHealthPolicyMap  = new ApplicationTypeHealthPolicyMap();
 }