public override int GetHashCode() { unchecked { var hashCode = (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Version != null ? Version.GetHashCode() : 0); #if NETFX hashCode = (hashCode * 397) ^ (FrameworkInstallation != null ? FrameworkInstallation.GetHashCode() : 0); #endif hashCode = (hashCode * 397) ^ (Raw != null ? Raw.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// Creates a new Runtime instance /// </summary> /// <param name="name">The name of the runtime</param> /// <param name="version">The version of the runtime</param> /// <param name="frameworkInstallation">The .NET Framework installation which is running the process</param> /// <param name="raw">The raw value when parsing was required</param> public Runtime( string name = null, string version = null, #if NETFX FrameworkInstallation frameworkInstallation = null, #endif string raw = null) { Name = name; Version = version; #if NETFX FrameworkInstallation = frameworkInstallation; #endif Raw = raw; }