Ejemplo n.º 1
0
 /// <summary>
 /// Gets the type definition for a Dot42 type.
 /// </summary>
 internal XTypeReference GetDot42InternalType(string typeNamespace, string typeName)
 {
     XTypeReference result;
     var key = typeNamespace + "." + typeName;
     if (!internalTypeReferences.TryGetValue(key, out result))
     {
         //result = new XTypeReference(Module, typeNamespace, typeName, assembly.MainModule, new AssemblyNameReference { Name = AssemblyConstants.SdkAssemblyName });
         result = new XTypeReference.SimpleXTypeReference(Module, typeNamespace, typeName, null, false, null);
         internalTypeReferences[key] = result;
     }
     return result;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Make a .NET method reference for the MonitorEnter/Exit instruction.
 /// </summary>
 private XMethodReference MonitorMethodReference(string methodName)
 {
     var declaringType = new XTypeReference.SimpleXTypeReference(module, "System.Threading", "Monitor", null, false, null);
     var methodRef = new XMethodReference.Simple(methodName, false, module.TypeSystem.Void, declaringType, new[] { module.TypeSystem.Object }, null);
     return methodRef;
 }