Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (ServiceName != null ? ServiceName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (MachineName != null ? MachineName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DisplayName != null ? DisplayName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Status.GetHashCode();
         hashCode = (hashCode * 397) ^ CanStart.GetHashCode();
         hashCode = (hashCode * 397) ^ CanPause.GetHashCode();
         hashCode = (hashCode * 397) ^ CanStop.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 2
0
 protected bool Equals(ServiceInfo other)
 {
     return(string.Equals(ServiceName, other.ServiceName) && string.Equals(MachineName, other.MachineName) && string.Equals(DisplayName, other.DisplayName) && Status == other.Status && CanStart.Equals(other.CanStart) && CanPause.Equals(other.CanPause) && CanStop.Equals(other.CanStop));
 }