コード例 #1
0
 protected override void Visit(FieldDefinition fieldDefinition, Unity.Cecil.Visitor.Context context)
 {
     if (!GenericsUtilities.CheckForMaximumRecursion(this._genericContext.Type))
     {
         base.Visit(fieldDefinition, context);
     }
 }
コード例 #2
0
 public void WriteDefinition(GenericInstanceType type, IMetadataCollection metadataCollection)
 {
     if (GenericsUtilities.CheckForMaximumRecursion(type))
     {
         object[] args = new object[] { MetadataWriter.Naming.ForGenericClass(type) };
         base.Writer.WriteLine("Il2CppGenericClass {0} = {{ -1, {{ NULL, NULL }}, NULL }};", args);
     }
     else
     {
         base.Writer.WriteExternForIl2CppGenericInst(type.GenericArguments);
         object[] objArray2 = new object[] { MetadataWriter.Naming.ForGenericClass(type), metadataCollection.GetTypeInfoIndex(type.Resolve()), MetadataWriter.Naming.ForGenericInst(type.GenericArguments), MetadataWriter.Naming.Null, MetadataWriter.Naming.Null };
         base.WriteLine("Il2CppGenericClass {0} = {{ {1}, {{ &{2}, {3} }}, {4} }};", objArray2);
     }
 }
コード例 #3
0
 protected override void Visit(MethodDefinition methodDefinition, Unity.Cecil.Visitor.Context context)
 {
     if ((!methodDefinition.HasGenericParameters || ((this._genericContext.Method != null) && (this._genericContext.Method.Resolve() == methodDefinition))) && !GenericsUtilities.CheckForMaximumRecursion(this._genericContext.Type))
     {
         base.VisitTypeReference(methodDefinition.ReturnType, context.ReturnType(methodDefinition));
         foreach (ParameterDefinition definition in methodDefinition.Parameters)
         {
             this.Visit(definition, context.Parameter(methodDefinition));
         }
     }
 }