Castle.Facilities.Synchronize.SynchronizeContextReference.GetHashCode C# (CSharp) Метод

GetHashCode() публичный Метод

Gets the hash code.
public GetHashCode ( ) : int
Результат int
		public override int GetHashCode()
		{
			return refType.GetHashCode() ^
			       (componentKey != null
			        	? componentKey.GetHashCode()
			        	: serviceType.GetHashCode());
		}

Usage Example

		public void SynchronizeContextReference_DifferentInstanceSameType_AreEqual()
		{
			var sync1 = new SynchronizeContextReference(typeof(string));
			var sync2 = new SynchronizeContextReference(typeof(string));

			Assert.AreEqual(sync1, sync2);
			Assert.AreEqual(sync1.GetHashCode(), sync2.GetHashCode());
		}
All Usage Examples Of Castle.Facilities.Synchronize.SynchronizeContextReference::GetHashCode