This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Embeddinator-4000.exe -gen=c -out=foo Foo.dll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// instead of this: | |
var intent = new Intent(); | |
intent.SetAction(notificationName); | |
intent.PutExtra(keyName, value); | |
Application.Context.SendBroadcast(intent); | |
// we can do this: | |
IntentFilter filter = new IntentFilter(); | |
filter.addAction(notificationName); | |
context.registerReceiver(new BroadcastReceiver() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// instead of this: | |
myLibrary.something(); | |
// we can do this: | |
CountDownLatch latch = new CountDownLatch(1); | |
new Handler(Looper.getMainLooper()).post(() -> { | |
myLibrary.something(); | |
latch.countDown(); | |
}); | |
latch.await(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// instead of this: | |
myLibrary.myMethod(myDictionary); | |
// we can do this: | |
myLibrary.myMethod(myDictionary.toJSON()); | |
// instead of this: | |
myLibrary.something(myList); | |
// we can do this: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// instead of this: | |
myLibrary.myMethod(myDataObject); | |
// we can do this: | |
myLibrary.myMethod(myDataObject.toJSON()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int32_t Mobile_AndroidOS_MyClass_MyMethod(Mobile_AndroidOS_MyClass* object, const char* input) { | |
const char __method_name[] = "Mobile.AndroidOS.MyClass:MyMethod(string)"; | |
static MonoMethod *__method = 0; | |
if (!__method) { | |
__lookup_class_Mobile_AndroidOS_MyClass(); | |
__method = mono_embeddinator_lookup_method(__method_name, class_Mobile_AndroidOS_MyClass); | |
} | |
MonoObject* __instance = mono_gchandle_get_target(object->_handle); | |
void* __args[1]; | |
MonoString* __input_0 = (input) ? mono_string_new(__mono_context.domain, input) : 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyClass implements MyInterface { | |
public Pointer __object; | |
public MyClass(Pointer var1) { | |
this.__object = var1; | |
} | |
public Pointer __getObject() { | |
return this.__object; | |
} | |
public MyClass() { | |
this.__object = Native_Mobile_Android.INSTANCE.Mobile_AndroidOS_MyClass_new(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (int)myMethodInput:(NSString *)input { | |
const char __method_name [] = "Mobile.iOS.MyClass:MyMethod(string)"; | |
__method = mono_embeddinator_lookup_method (__method_name, Mobile_iOS_MyClass_class); | |
MonoObject* __result = mono_runtime_invoke (__method, __instance, __args, &__exception); | |
void* __unbox = mono_object_unbox (__result); | |
return *((int*)__unbox); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface Mobile_iOS_MyClass : NSObject <Mobile_iOS_MyInterface> { | |
@public MonoEmbedObject* _object; | |
} | |
- (nullable instancetype)init; | |
- (int)myMethodInput:(NSString *)input; | |
- (nullable instancetype)initForSuper; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Mobile.iOS { | |
public interface MyInterface {} | |
public class MyClass: MyInterface { | |
public int MyMethod(string input) { | |
return 0; | |
}}} |
NewerOlder