Example #1
0
 public FixedTypeKeyUInt64ValueHashtableGenerator(ModuleDefinition module, TypeKeyUInt64ValuePairGenerator pairGenerator, SystemObjectHelper systemObjectHelper, SystemTypeHelper typeHelper, ModuleImporter importer, SystemArrayHelper arrayHelper, double loadFactor)
 {
     generator = new FixedTypeKeyGenerator <UnionSerializationInfo, TypeKeyUInt64ValuePairGenerator>(
         TypeName,
         module,
         pairGenerator,
         systemObjectHelper,
         typeHelper,
         importer,
         arrayHelper,
         loadFactor,
         (processor, unionInfo) =>
     {
         var(instruction0, instruction1) = InstructionUtility.LdcU8(unionInfo.Value);
         processor.Append(instruction0);
         if (!(instruction1 is null))
         {
             processor.Append(instruction1);
         }
     },
Example #2
0
 public FixedTypeKeyInterfaceMessagePackFormatterValueHashtableGenerator(ModuleDefinition module, TypeKeyInterfaceMessagePackFormatterValuePairGenerator pairGenerator, SystemObjectHelper systemObjectHelper, SystemTypeHelper typeHelper, ModuleImporter importer, SystemArrayHelper arrayHelper, double loadFactor)
 {
     this.importer   = importer;
     this.typeHelper = typeHelper;
     customFormatterConstructorImporter = new CustomFormatterConstructorImporter(module.TypeSystem.Void, importer);
     generator = new FixedTypeKeyGenerator <FormatterTableItemInfo, TypeKeyInterfaceMessagePackFormatterValuePairGenerator>(
         TypeName,
         module,
         pairGenerator,
         systemObjectHelper,
         typeHelper,
         importer,
         arrayHelper,
         loadFactor,
         LoadAppropriateValueFromFormatterInfo,
         info => info.SerializeTypeReference,
         new[] { Instruction.Create(OpCodes.Ldnull), });
 }
Example #3
0
 public FixedTypeKeyInt32ValueHashtableGenerator(ModuleDefinition module, TypeKeyInt32ValuePairGenerator pairGenerator, SystemObjectHelper systemObjectHelper, SystemTypeHelper typeHelper, ModuleImporter importer, SystemArrayHelper arrayHelper, double loadFactor)
 {
     generator = new FixedTypeKeyGenerator <UnionSerializationInfo, TypeKeyInt32ValuePairGenerator>(
         TypeName,
         module,
         pairGenerator,
         systemObjectHelper,
         typeHelper,
         importer,
         arrayHelper,
         loadFactor,
         (processor, unionInfo) =>
     {
         processor.Append(InstructionUtility.LdcI4(unionInfo.Index));
     },
         unionInfo => unionInfo.Type,
         new[] { Instruction.Create(OpCodes.Ldc_I4_M1), });
 }