Using Mate RemoteObjectInvoker with C # Classes

I use the Mate environment for Flex and communicate with the server running C #. I'm having trouble mapping C # classes to ActopnScript classes. This works fine for me for simple classes and built-in data types.

If I have a C # method in my API that returns API.Foo.Result <API.Foo.Bar> what name do I use for my RemoteClass alias? Do I need to make a separate ActionScript class for each API.Foo.Result variant?

How do I call a C # method that takes a class as a parameter? Creating an ActionScript class with members with the same name does not work.

What is the best way to handle C # classes containing arrays of objects? It seems that they are being converted to an ArrayCollections object. Is there a way to get them to convert to an ArrayCollection of my specific class?

+3
source share
1 answer

Question answer

If I have a C # method in my API that returns API.Foo.Result, what name do I use for my RemoteClass alias?

The class name AS can be anything. But you must specify the C # class name inside the annotation of the remote class.

[RemoteClass(alias="API.Foo.Result")]
public class Result VO
{
    ...
}

Additional Information...


Do I need to make a separate ActionScript Class for each API.Foo.Result variant?

, . , FlourineFX. , .


#, ?

-, DTO .

AS RemoteObject.; )


# , ?

- FlourineFX ( ). Flex .

.


, ...

+2

Source: https://habr.com/ru/post/1740937/


All Articles