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


C# IILGen.Call方法代码示例

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


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

示例1: Load

 public void Load(IILGen ilGenerator, Action<IILGen> pushReaderOrCtx)
 {
     pushReaderOrCtx(ilGenerator);
     Type typeRead;
     if (_signed)
     {
         ilGenerator.Call(() => default(AbstractBufferedReader).ReadVInt64());
         typeRead = typeof(long);
     }
     else
     {
         ilGenerator.Call(() => default(AbstractBufferedReader).ReadVUInt64());
         typeRead = typeof(ulong);
     }
     new DefaultTypeConvertorGenerator().GenerateConversion(typeRead, _enumType.GetEnumUnderlyingType())(ilGenerator);
 }
开发者ID:Bobris,项目名称:BTDB,代码行数:16,代码来源:EnumFieldHandler.cs

示例2: GenerateLoad

 public void GenerateLoad(IILGen ilGenerator, Action<IILGen> pushReader, Action<IILGen> pushCtx, Action<IILGen> pushDescriptor, Type targetType)
 {
     pushReader(ilGenerator);
     ilGenerator.Call(() => default(AbstractBufferedReader).ReadByteArray());
     if (targetType == typeof (ByteBuffer))
     {
         ilGenerator.Call(() => ByteBuffer.NewAsync(null));
         return;
     }
     if (targetType != typeof (object))
     {
         if (targetType!=typeof(byte[]))
             throw new ArgumentOutOfRangeException(nameof(targetType));
         return;
     }
     ilGenerator.Castclass(typeof(object));
 }
开发者ID:Xamarui,项目名称:BTDB,代码行数:17,代码来源:ByteArrayTypeDescriptor.cs

示例3: GenerateSave

 public void GenerateSave(IILGen ilGenerator, Action<IILGen> pushWriter, Action<IILGen> pushCtx, Action<IILGen> pushValue, Type valueType)
 {
     pushWriter(ilGenerator);
     pushValue(ilGenerator);
     if (valueType==typeof(byte[]))
         ilGenerator.Call(() => default(AbstractBufferedWriter).WriteByteArray(null));
     else if (valueType==typeof(ByteBuffer))
         ilGenerator.Call(() => default(AbstractBufferedWriter).WriteByteArray(ByteBuffer.NewEmpty()));
     else throw new ArgumentOutOfRangeException(nameof(valueType));
 }
开发者ID:tomasdeml,项目名称:BTDB,代码行数:10,代码来源:ByteArrayTypeDescriptor.cs

示例4: GenerateLoad

 public void GenerateLoad(IILGen ilGenerator, Action<IILGen> pushReader, Action<IILGen> pushCtx, Action<IILGen> pushDescriptor, Type targetType)
 {
     pushReader(ilGenerator);
     ilGenerator.Call(_loader);
     if (targetType != typeof(object))
     {
         if (targetType != GetPreferedType())
             throw new ArgumentOutOfRangeException(nameof(targetType));
         return;
     }
     if (GetPreferedType().IsValueType)
     {
         ilGenerator.Box(GetPreferedType());
     }
     else
     {
         ilGenerator.Castclass(typeof(object));
     }
 }
开发者ID:klesta490,项目名称:BTDB,代码行数:19,代码来源:SimpleTypeDescriptor.cs

示例5: GenerateSkip

 public void GenerateSkip(IILGen ilGenerator, Action<IILGen> pushReader, Action<IILGen> pushCtx)
 {
     pushReader(ilGenerator);
     if (_signed)
     {
         ilGenerator.Call(() => default(AbstractBufferedReader).SkipVInt64());
     }
     else
     {
         ilGenerator.Call(() => default(AbstractBufferedReader).SkipVUInt64());
     }
 }
开发者ID:klesta490,项目名称:BTDB,代码行数:12,代码来源:EnumTypeDescriptor.cs

示例6: GenerateLoad

 public void GenerateLoad(IILGen ilGenerator, Action<IILGen> pushReader, Action<IILGen> pushCtx, Action<IILGen> pushDescriptor, Type targetType)
 {
     pushReader(ilGenerator);
     Type typeRead;
     if (_signed)
     {
         ilGenerator.Call(() => default(AbstractBufferedReader).ReadVInt64());
         typeRead = typeof(long);
     }
     else
     {
         ilGenerator.Call(() => default(AbstractBufferedReader).ReadVUInt64());
         typeRead = typeof(ulong);
     }
     if (targetType == typeof(object))
     {
         ilGenerator.Do(pushDescriptor);
         if (_signed)
         {
             ilGenerator.Newobj(() => new DynamicEnum(0L, null));
         }
         else
         {
             ilGenerator.Newobj(() => new DynamicEnum(0UL, null));
         }
         ilGenerator.Castclass(typeof(object));
         return;
     }
     new DefaultTypeConvertorGenerator().GenerateConversion(typeRead, targetType.GetEnumUnderlyingType())(ilGenerator);
 }
开发者ID:klesta490,项目名称:BTDB,代码行数:30,代码来源:EnumTypeDescriptor.cs

示例7: GenerateSave

 public void GenerateSave(IILGen ilGenerator, Action<IILGen> pushWriter, Action<IILGen> pushCtx, Action<IILGen> pushValue, Type valueType)
 {
     pushWriter(ilGenerator);
     pushValue(ilGenerator);
     ilGenerator.Call(_saver);
 }
开发者ID:klesta490,项目名称:BTDB,代码行数:6,代码来源:SimpleTypeDescriptor.cs

示例8: GenerateSkip

 public void GenerateSkip(IILGen ilGenerator, Action<IILGen> pushReader, Action<IILGen> pushCtx)
 {
     pushReader(ilGenerator);
     ilGenerator.Call(_skipper);
 }
开发者ID:klesta490,项目名称:BTDB,代码行数:5,代码来源:SimpleTypeDescriptor.cs

示例9: Save

 public void Save(IILGen ilGenerator, Action<IILGen> pushWriterOrCtx, Action<IILGen> pushValue)
 {
     pushWriterOrCtx(ilGenerator);
     pushValue(ilGenerator);
     ilGenerator.Call(_saver);
 }
开发者ID:Xamarui,项目名称:BTDB,代码行数:6,代码来源:SimpleFieldHandlerBase.cs

示例10: Skip

 public void Skip(IILGen ilGenerator, Action<IILGen> pushReaderOrCtx)
 {
     if (_skipper == null) return;
     pushReaderOrCtx(ilGenerator);
     ilGenerator.Call(_skipper);
 }
开发者ID:Xamarui,项目名称:BTDB,代码行数:6,代码来源:SimpleFieldHandlerBase.cs

示例11: Load

 public void Load(IILGen ilGenerator, Action<IILGen> pushReaderOrCtx)
 {
     pushReaderOrCtx(ilGenerator);
     ilGenerator.Call(_loader);
 }
开发者ID:Xamarui,项目名称:BTDB,代码行数:5,代码来源:SimpleFieldHandlerBase.cs

示例12: SaveByteBuffer

 protected virtual void SaveByteBuffer(IILGen ilGenerator, Action<IILGen> pushWriterOrCtx, Action<IILGen> pushValue)
 {
     pushWriterOrCtx(ilGenerator);
     pushValue(ilGenerator);
     ilGenerator.Call(() => default(AbstractBufferedWriter).WriteByteArray(ByteBuffer.NewEmpty()));
 }
开发者ID:Bobris,项目名称:BTDB,代码行数:6,代码来源:ByteArrayFieldHandler.cs

示例13: Skip

 public virtual void Skip(IILGen ilGenerator, Action<IILGen> pushReaderOrCtx)
 {
     pushReaderOrCtx(ilGenerator);
     ilGenerator.Call(() => default(AbstractBufferedReader).SkipByteArray());
 }
开发者ID:Bobris,项目名称:BTDB,代码行数:5,代码来源:ByteArrayFieldHandler.cs

示例14: Save

 public virtual void Save(IILGen ilGenerator, Action<IILGen> pushWriterOrCtx, Action<IILGen> pushValue)
 {
     pushWriterOrCtx(ilGenerator);
     pushValue(ilGenerator);
     ilGenerator.Call(() => default(AbstractBufferedWriter).WriteByteArray(null));
 }
开发者ID:Bobris,项目名称:BTDB,代码行数:6,代码来源:ByteArrayFieldHandler.cs

示例15: Load

 public void Load(IILGen ilGenerator, Action<IILGen> pushReaderOrCtx)
 {
     _fieldHandler.Load(ilGenerator, pushReaderOrCtx);
     ilGenerator.Call(() => ByteBuffer.NewAsync(null));
 }
开发者ID:Bobris,项目名称:BTDB,代码行数:5,代码来源:ByteArrayFieldHandler.cs


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