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


C# IWriteContext.WriteInt方法代码示例

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


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

示例1: Write

			public void Write(IWriteContext context, object obj)
			{
				CustomTypeHandlerTestCase.Item item = (CustomTypeHandlerTestCase.Item)obj;
				if (item.numbers == null)
				{
					context.WriteInt(-1);
					return;
				}
				context.WriteInt(item.numbers.Length);
				for (int i = 0; i < item.numbers.Length; i++)
				{
					context.WriteInt(item.numbers[i]);
				}
			}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:14,代码来源:CustomTypeHandlerTestCase.cs

示例2: Write

			public virtual void Write(IWriteContext context, object obj)
			{
				_writeCalls++;
				FieldsToTypeHandlerMigrationTestCase.Item item = (FieldsToTypeHandlerMigrationTestCase.Item
					)obj;
				context.WriteInt(item._id + 42);
			}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:FieldsToTypeHandlerMigrationTestCase.cs

示例3: Write

        // #end example

        // #example: Write the StringBuilder
        public void Write(IWriteContext writeContext, object o)
        {
            StringBuilder builder = (StringBuilder) o;
            string str = builder.ToString();
            byte[] bytes = Encoding.UTF8.GetBytes(str);
            writeContext.WriteInt(bytes.Length);
            writeContext.WriteBytes(bytes);
        }
开发者ID:Galigator,项目名称:db4o,代码行数:11,代码来源:StringBuilderHandler.cs

示例4: Write

		public override void Write(IWriteContext context, object obj)
		{
			context.WriteInt(Sharpen.Runtime.FloatToIntBits(((float)obj)));
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:4,代码来源:FloatHandler.cs

示例5: Write

 public virtual void Write(IWriteContext context, object obj)
 {
     _writeCalls++;
     var item = (Item
         ) obj;
     context.WriteInt(item._id + 42);
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:TranslatorToTypehandlerMigrationTestCase.cs

示例6: WriteElementCount

		private void WriteElementCount(IWriteContext context, IDictionary map)
		{
			context.WriteInt(map.Count);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:4,代码来源:MapTypeHandler.cs

示例7: WriteClassMetadataIds

		private void WriteClassMetadataIds(IWriteContext context, KeyValueHandlerPair handlers
			)
		{
			context.WriteInt(0);
			context.WriteInt(0);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:6,代码来源:MapTypeHandler.cs

示例8: Write

 public void Write(IWriteContext context, object obj)
 {
     var item = (ItemGrandChild
         ) obj;
     context.WriteInt(item.age);
     context.WriteInt(100);
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:CustomTypeHandlerTestCase.cs

示例9: WriteKind

	    protected virtual void WriteKind(IWriteContext context, DateTime dateTime)
	    {
	        context.WriteInt((int) dateTime.Kind);
	    }
开发者ID:superyfwy,项目名称:db4o,代码行数:4,代码来源:DateTimeHandler.cs

示例10: WriteDimensions

		protected virtual void WriteDimensions(IWriteContext context, ArrayInfo info)
		{
			context.WriteInt(info.ElementCount());
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:4,代码来源:ArrayHandler.cs

示例11: WriteElementClassMetadataId

		private void WriteElementClassMetadataId(IWriteContext context, ITypeHandler4 elementHandler
			)
		{
			context.WriteInt(0);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:5,代码来源:CollectionTypeHandler.cs

示例12: WriteDimensions

 protected override void WriteDimensions(IWriteContext context, ArrayInfo info)
 {
     var dim = ((MultidimensionalArrayInfo) info).Dimensions();
     context.WriteInt(dim.Length);
     for (var i = 0; i < dim.Length; i++)
     {
         context.WriteInt(dim[i]);
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:9,代码来源:MultidimensionalArrayHandler.cs

示例13: Write

		public override void Write(IWriteContext context, object obj)
		{
			context.WriteInt(((int)obj));
		}
开发者ID:Galigator,项目名称:db4o,代码行数:4,代码来源:IntHandler.cs

示例14: WriteElementCount

		private void WriteElementCount(IWriteContext context, ICollection collection)
		{
			context.WriteInt(collection.Count);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:4,代码来源:CollectionTypeHandler.cs

示例15: WriteHeader

		private void WriteHeader(IWriteContext context, ArrayInfo info)
		{
			context.WriteInt(MarshalledClassID(Container(context), info));
			_versionHelper.WriteTypeInfo(context, info);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:ArrayHandler.cs


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