string.GetHashCode()

Here are the examples of the csharp api class string.GetHashCode() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

200 Examples 7

1. Example

Project: 0install-win
Source File: RegistryFilterRule.cs
public override int GetHashCode()
        {
            unchecked
            {
                int result = ProcessValue.GetHashCode();
                result = (result * 397) ^ RegistryValue.GetHashCode();
                return result;
            }
        }

2. Example

Project: TraceLab
Source File: ClassFileWriter.cs
public override int GetHashCode()
		{
			return str.GetHashCode();
		}

3. Example

Project: TraceLab
Source File: AssemblyName.cs
public override int GetHashCode()
		{
			return FullName.GetHashCode();
		}

4. Example

Project: TraceLab
Source File: TypeNameParser.cs
public override int GetHashCode()
		{
			return ns == null ? name.GetHashCode() : ns.GetHashCode() * 37 + name.GetHashCode();
		}

5. Example

Project: TraceLab
Source File: intrinsics.cs
public override int GetHashCode()
			{
				return methodName.GetHashCode();
			}

6. Example

Project: TraceLab
Source File: ComponentMetadata.cs
public override int GetHashCode()
        {
            int iospecHash = IOSpec.GetHashCode();
            int componentMetadataDefinitionIDHash = ComponentMetadataDefinitionID.GetHashCode();
            int configWrapperHash = ConfigWrapper.GetHashCode();
            int labelHash = Label.GetHashCode();
            int componentMetadataDefinitionHash = ComponentMetadataDefinition.GetHashCode();

            return iospecHash ^ componentMetadataDefinitionIDHash ^ configWrapperHash ^ labelHash ^ componentMetadataDefinitionHash;
        }

7. Example

Project: TraceLab
Source File: IOItem.cs
public override int GetHashCode()
        {
            int inputDefinitionHash = IOItemDefinition.GetHashCode();
            int mappedToHash = MappedTo.GetHashCode();

            return inputDefinitionHash ^ mappedToHash;
        }

8. Example

Project: TraceLab
Source File: IOItemDefinition.cs
public override int GetHashCode()
        {
            int nameHash = Name.GetHashCode();
            int typeHash = Type.GetHashCode();

            return nameHash ^ typeHash;
        }

9. Example

Project: TraceLab
Source File: RunnableNode.cs
public override int GetHashCode()
        {
            return Id.GetHashCode();
        }

10. Example

Project: TraceLab
Source File: ExperimentNode.cs
public override int GetHashCode()
        {
            return ID.GetHashCode();
        }

11. Example

Project: TraceLab
Source File: ExperimentNodeError.cs
public override int GetHashCode()
        {
            int errorHash = ErrorType.GetHashCode();
            if (ErrorMessage != null)
            {
                errorHash ^= ErrorMessage.GetHashCode();
            }

            return errorHash;
        }

12. Example

Project: TraceLab
Source File: RecentExperimentReference.cs
public override int GetHashCode()
        {
            return this.m_fullPath.GetHashCode(); 
        }

13. Example

Project: TraceLab
Source File: PackageReference.cs
public override int GetHashCode()
        {
            return (ID + Name).GetHashCode();
        }

14. Example

Project: TraceLab
Source File: CachingSerializerTest.cs
public override int GetHashCode()
            {
                int typeHash = Test != null ? Test.GetHashCode() : 0;
                return typeHash;
            }

15. Example

Project: TraceLab
Source File: WorkspaceTest.cs
public override int GetHashCode()
        {
            int typeHash = Value != null ? Value.GetHashCode() : 0;
            return typeHash;
        }

16. Example

Project: TraceLab
Source File: DatasetResults.cs
public override int GetHashCode()
        {
            return DatasetName.GetHashCode();
        }

17. Example

Project: TraceLab
Source File: TLArtifact.cs
public override int GetHashCode()
        {
            int idhash = Id.GetHashCode();
            int textHash = Text.GetHashCode();

            int hash = idhash ^ textHash;

            return hash;
        }

18. Example

Project: colored-console
Source File: ColorToken.cs
public override int GetHashCode()
        {
            return this.text == null ? 0 : this.text.GetHashCode();
        }

19. Example

Project: concordion-net
Source File: Resource.cs
public override int GetHashCode()
        {
            return Path.GetHashCode();
        }

20. Example

Project: TFSEvolution
Source File: DescriptionAttribute.cs
public override int GetHashCode()
        {
            return Description.GetHashCode();
        }

21. Example

Project: TFSEvolution
Source File: ImageSample.cs
public override int GetHashCode()
        {
            return Src.GetHashCode();
        }

22. Example

Project: TFSEvolution
Source File: InvalidSample.cs
public override int GetHashCode()
        {
            return ErrorMessage.GetHashCode();
        }

23. Example

Project: TFSEvolution
Source File: TextSample.cs
public override int GetHashCode()
        {
            return Text.GetHashCode();
        }

24. Example

Project: GridDomain
Source File: NodeNetworkAddress.cs
public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = (Host != null ? Host.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ PortNumber;
                return hashCode;
            }
        }

25. Example

Project: ContinuousTests
Source File: Money.cs
public override int GetHashCode() 
		{
			return fCurrency.GetHashCode()+fAmount;
		}

26. Example

Project: ContinuousTests
Source File: Addin.cs
public override int GetHashCode()
        {
            return this.typeName.GetHashCode();
        }

27. Example

Project: ContinuousTests
Source File: TestName.cs
public override int GetHashCode()
		{
			return unchecked( this.testID.GetHashCode() + this.fullName.GetHashCode() );
		}

28. Example

Project: ContinuousTests
Source File: TestTree.cs
public override int GetHashCode()
		{
			return signature.GetHashCode ();
		}

29. Example

Project: ContinuousTests
Source File: Money.cs
public override int GetHashCode() 
		{
			return fCurrency.GetHashCode()+fAmount;
		}

30. Example

Project: ContinuousTests
Source File: Addin.cs
public override int GetHashCode()
        {
            return this.typeName.GetHashCode();
        }

31. Example

Project: ContinuousTests
Source File: TestName.cs
public override int GetHashCode()
		{
			return unchecked( this.testID.GetHashCode() + this.fullName.GetHashCode() );
		}

32. Example

Project: ContinuousTests
Source File: Money.cs
public override int GetHashCode() 
		{
			return fCurrency.GetHashCode()+fAmount;
		}

33. Example

Project: ContinuousTests
Source File: Addin.cs
public override int GetHashCode()
        {
            return this.typeName.GetHashCode();
        }

34. Example

Project: ContinuousTests
Source File: TestName.cs
public override int GetHashCode()
		{
			return unchecked( this.testID.GetHashCode() + this.fullName.GetHashCode() );
		}

35. Example

Project: ContinuousTests
Source File: TestTree.cs
public override int GetHashCode()
		{
			return signature.GetHashCode ();
		}

36. Example

Project: ContinuousTests
Source File: BuildItem.cs
public override int GetHashCode()
        {
            if (_hashCode != 0) return _hashCode;
            // Overflow is fine, just wrap
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + (Key == null ? 0 : Key.GetHashCode());
                hash = hash * 23 + (Value == null ? 0 : Value.GetHashCode());
                _hashCode = hash;
                return _hashCode;
            }
        }

37. Example

Project: ContinuousTests
Source File: TestItem.cs
public override int GetHashCode()
        {
            if (_hashCode != 0) return _hashCode;
            // Overflow is fine, just wrap
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + (Key == null ? 0 : Key.GetHashCode());
                hash = hash * 23 + (Value == null ? 0 : Value.GetHashCode());
                _hashCode = hash;
                return _hashCode;
            }
        }

38. Example

Project: ContinuousTests
Source File: RunnerExe.cs
public override int GetHashCode ()
		{
            // Overflow is fine, just wrap
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + Exe.GetHashCode();
                hash = hash * 23 + Version.GetHashCode();
                return hash;
            }
		}

39. Example

Project: ContinuousTests
Source File: CacheBuildMessage.cs
public override int GetHashCode()
        {
            // Overflow is fine, just wrap
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + (Project == null ? 0 : Project.GetHashCode());
                hash = hash * 23 + (BuildItem == null ? 0 : BuildItem.GetHashCode());
                return hash;
            }
        }

40. Example

Project: ContinuousTests
Source File: CacheTestMessage.cs
public override int GetHashCode()
        {
            // Overflow is fine, just wrap
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + (Assembly == null ? 0 : Assembly.GetHashCode());
                hash = hash * 23 + (Test == null ? 0 : Test.GetHashCode());
                return hash;
            }
        }

41. Example

Project: ContinuousTests
Source File: TestResult.cs
public override int GetHashCode()
        {
            // Overflow is fine, just wrap
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + _runner.GetHashCode();
                hash = hash * 23 + (_name == null ? 0 : _name.GetHashCode());
                hash = hash * 23 + (_message == null ? 0 : _message.GetHashCode());
                foreach (var line in _stackTrace)
                {
                    hash = hash * 23 + (line.File == null ? 0 : line.File.GetHashCode());
                    hash = hash * 23 + (line.Method == null ? 0 : line.Method.GetHashCode());
                    hash = hash * 23 + line.LineNumber.GetHashCode();
                }
                return hash;
            }
        }

42. Example

Project: ContinuousTests
Source File: Money.cs
public override int GetHashCode() 
		{
			return fCurrency.GetHashCode()+fAmount;
		}

43. Example

Project: ContinuousTests
Source File: Row.cs
public int GetHashCode (Row<string, string> obj)
		{
			string x = obj.Col1, y = obj.Col2;
			return (x != null ? x.GetHashCode () : 0) ^ (y != null ? y.GetHashCode () : 0);
		}

44. Example

Project: ContinuousTests
Source File: Money.cs
public override int GetHashCode() 
		{
			return fCurrency.GetHashCode()+fAmount;
		}

45. Example

Project: ContinuousTests
Source File: TestDescriptor.cs
public override int GetHashCode()
        {
            unchecked
            {
                int result = (Target != null ? Target.GetHashCode() : 0);
                result = (result*397) ^ (Assembly != null ? Assembly.GetHashCode() : 0);
                result = (result*397) ^ (Type != null ? Type.GetHashCode() : 0);
                return result;
            }
        }

46. Example

Project: ContinuousTests
Source File: TestDescriptor.cs
public override int GetHashCode()
        {
            unchecked
            {
                int result = (Target != null ? Target.GetHashCode() : 0);
                result = (result*397) ^ (Assembly != null ? Assembly.GetHashCode() : 0);
                result = (result*397) ^ (Type != null ? Type.GetHashCode() : 0);
                return result;
            }
        }

47. Example

Project: ContinuousTests
Source File: Variable.cs
public override int GetHashCode()
		{
			return this.Index ^ this.Name.GetHashCode();
		}

48. Example

Project: opc-ua-client
Source File: ExpandedNodeId.cs
public override int GetHashCode()
        {
            int result = this.NodeId.GetHashCode();
            result = (397 * result) ^ (this.NamespaceUri != null ? this.NamespaceUri.GetHashCode() : 0);
            result = (397 * result) ^ (int)this.ServerIndex;
            return result;
        }

49. Example

Project: opc-ua-client
Source File: LocalizedText.cs
public override int GetHashCode()
        {
            int result = this.Locale != null ? this.Locale.GetHashCode() : 0;
            result = (397 * result) ^ (this.Text != null ? this.Text.GetHashCode() : 0);
            return result;
        }

50. Example

Project: QuickUnity
Source File: TestResult.cs
public override int GetHashCode()
        {
            return id.GetHashCode();
        }