当前位置: 首页>>代码示例>>C#>>正文


C# MessagePackObject.Equals方法代码示例

本文整理汇总了C#中MessagePackObject.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# MessagePackObject.Equals方法的具体用法?C# MessagePackObject.Equals怎么用?C# MessagePackObject.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MessagePackObject的用法示例。


在下文中一共展示了MessagePackObject.Equals方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestEquals_Map_Raw_False

		public void TestEquals_Map_Raw_False()
		{
			var target = new MessagePackObject( new MessagePackObjectDictionary { { "A", "A" }, { "B", "B" }, { "C", "C" } } );
			var other = new MessagePackObject( "ABC" );
			Assert.IsFalse( target.Equals( other ) );
		}
开发者ID:msgpack,项目名称:msgpack-cli,代码行数:6,代码来源:MessagePackObjectTest.Equals.cs

示例2: TestEqualsCore

		private static void TestEqualsCore( MessagePackObject left, MessagePackObject right, bool expected )
		{
			Assert.AreEqual( expected, left.Equals( right ), "{0}=={1}", left.DebugDump(), right.DebugDump() );
		}
开发者ID:msgpack,项目名称:msgpack-cli,代码行数:4,代码来源:MessagePackObjectTest.Equals.cs

示例3: TestEquals_EmptyMap_Empty_True

		public void TestEquals_EmptyMap_Empty_True()
		{
			var target = new MessagePackObject( new MessagePackObjectDictionary( 0 ) );
			Assert.IsTrue( target.Equals( new MessagePackObjectDictionary( 0 ) ) );
		}
开发者ID:msgpack,项目名称:msgpack-cli,代码行数:5,代码来源:MessagePackObjectTest.Equals.cs

示例4: TestEquals_EmptyMap_Null_False

		public void TestEquals_EmptyMap_Null_False()
		{
			var target = new MessagePackObject( new MessagePackObjectDictionary( 0 ) );
			Assert.IsFalse( target.Equals( default( object ) ) );
		}
开发者ID:msgpack,项目名称:msgpack-cli,代码行数:5,代码来源:MessagePackObjectTest.Equals.cs

示例5: TestEquals_Map_SubMap_False

		public void TestEquals_Map_SubMap_False()
		{
			var target = new MessagePackObject( new MessagePackObjectDictionary() { { "A", 1 }, { "B", 2 }, { "C", 3 } } );
			var other = new MessagePackObject( new MessagePackObjectDictionary() { { "A", 1 }, { "B", 2 } } );
			Assert.IsFalse( target.Equals( other ) );
		}
开发者ID:msgpack,项目名称:msgpack-cli,代码行数:6,代码来源:MessagePackObjectTest.Equals.cs

示例6: TestEquals_Map_Null_False

		public void TestEquals_Map_Null_False()
		{
			var target = new MessagePackObject( new MessagePackObjectDictionary() { { "A", 1 }, { "B", 2 }, { "C", 3 } } );
			Assert.IsFalse( target.Equals( default( object ) ) );
		}
开发者ID:msgpack,项目名称:msgpack-cli,代码行数:5,代码来源:MessagePackObjectTest.Equals.cs

示例7: TestEquals_Array_Raw_False

		public void TestEquals_Array_Raw_False()
		{
			var target = new MessagePackObject( new MessagePackObject[] { ( byte )'A', ( byte )'B', ( byte )'C' } );
			var other = new MessagePackObject( "ABC" );
			Assert.IsFalse( target.Equals( other ) );
		}
开发者ID:msgpack,项目名称:msgpack-cli,代码行数:6,代码来源:MessagePackObjectTest.Equals.cs

示例8: TestEquals_EmptyArray_Null_False

		public void TestEquals_EmptyArray_Null_False()
		{
			var target = new MessagePackObject( new MessagePackObject[ 0 ] );
			Assert.IsFalse( target.Equals( default( object ) ) );
		}
开发者ID:msgpack,项目名称:msgpack-cli,代码行数:5,代码来源:MessagePackObjectTest.Equals.cs

示例9: TestEquals_EmptyArray_Empty_True

		public void TestEquals_EmptyArray_Empty_True()
		{
			var target = new MessagePackObject( new MessagePackObject[ 0 ] );
			Assert.IsTrue( target.Equals( new MessagePackObject[ 0 ] ) );
		}
开发者ID:msgpack,项目名称:msgpack-cli,代码行数:5,代码来源:MessagePackObjectTest.Equals.cs

示例10: TestEquals_Array_SubArray_False

		public void TestEquals_Array_SubArray_False()
		{
			var target = new MessagePackObject( new MessagePackObject[] { 1, 2, 3 } );
			var other = new MessagePackObject( new MessagePackObject[] { 1, 2 } );
			Assert.IsFalse( target.Equals( other ) );
		}
开发者ID:msgpack,项目名称:msgpack-cli,代码行数:6,代码来源:MessagePackObjectTest.Equals.cs

示例11: AssertArraySegment

		private static void AssertArraySegment( MessagePackObject expected, ArraySegment<byte> actual )
		{
			var result = Unpacking.UnpackObject( actual.AsEnumerable().ToArray() );
			Assert.That( result.ReadCount, Is.EqualTo( actual.Count ) );
			Assert.That( expected.Equals( result.Value ) );
		}
开发者ID:jackerdey,项目名称:msgpack-rpc-cli,代码行数:6,代码来源:ServerResponseContextTest.cs


注:本文中的MessagePackObject.Equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。