Closed jbielski closed 6 years ago
Hello, I'm not an expert on that side, but I have added the c tag to get the attention of the right developers. Thanks for the bug report/question.
Thank you. Since I opened this bug report, I figured out that I was hitting the documented limitation: you cannot use two different .NET Embedding-generated libraries inside the same application. So I applied the workaround of passing multiple DLLs on the command line. Now I hit a different problem, but still having to do with the C bindings. Should I open another bug report or add on to this one?
public partial class RepresentationSystemRepresentationsEnumeratedRepresentation { public object[] Items; ...
Gets translated to this:
and this: void AgGateway_ADAPT_Representation_Generated_RepresentationSystemRepresentationsEnumeratedRepresentation_set_Items(AgGateway_ADAPT_Representation_Generated_RepresentationSystemRepresentationsEnumeratedRepresentation object, value) { static MonoClassField field = 0; if (!field) { lookup_class_AgGateway_ADAPT_Representation_Generated_RepresentationSystemRepresentationsEnumeratedRepresentation(); const char field_name[] = "Items"; field = mono_class_get_field_from_name(class_AgGateway_ADAPT_Representation_Generated_RepresentationSystemRepresentationsEnumeratedRepresentation, field_name); } void value = ; MonoObject* instance = mono_gchandle_get_target(object->_handle); mono_field_set_value(instance, field, __value); } which results in this compilation error: ADAPTShared_c/AgGateway.ADAPT.Representation.c:2389:21: error: expected expression void* __value = ;
@jbielski please file a new issue so that we can have a clean start and focus on the right problem. Once you have created the issue, please close this bug and link to it so that if other users have the smaller problem can follow up.
Opened issue 686 instead
Apologize in advance if I simply misunderstand the function that Embeddinator is supposed to provide. I'm new to .NET.
Steps to Reproduce
Expected Behavior
C code generated for all the APIs in my .NET wrapper class library
Actual Behavior
C code only generated for .NET APIs that return strings and ints, not for those that return .NET class objects or interfaces
Environment
This is my wrapper class. I only got setters and getters for variables with native types. using System; using System.IO; using System.IO.Compression; using AgGateway.ADAPT.ApplicationDataModel.ADM; using AgGateway.ADAPT.PluginManager;
namespace ADMWrapper { public class Wrapper { // Find and initialize the ADM Plugin private static IPlugin AdmPlugin { get; set; } private static string SourcePath { get; set; } private static ApplicationDataModel DataModel { get; set; } //private static GrowerTree GrowerTree { get; set; } private static int UseGrowerId { get; set; } = 0; private static int UseFarmId { get; set; } = 0; private static int UseFieldId { get; set; } = 0;
}
Build Logs
Example Project (If Possible)