[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Gleb Holodov

6/30/2004 9:50:00 AM

Deat All!

I maybe missing something, but is there a way to control how arrays are
marshaled during remoting? I know, that since they're serializable and not
MBR, they will be marshaled by value, but will they be transported back to
the client? A server might change contents of an array, so remoting has no
means to decide whether it happened and should pack it into the return
message.
So, my question is: is there a way to influence whether an array will or
won't be sent back to a client when remoting methods like these, and what is
the default behavior:

void Method( Array ar );
- or -
void Method( SomeClass[] ar );

Thanks in advance,
Gleb


2 Answers

jgauntz

6/30/2004 12:25:00 PM

0

You can use the ref and out method parameters. The ref and out method parameters can be used for value types and for reference types that are serializable. Using the ref parameter, the argument is marshaled in both directions, the out parameter goes from the server to the client, and using no parameter sedn the data to the server.

Hope this helps,

Jason Gauntz

"Gleb Holodov" wrote:

> Deat All!
>
> I maybe missing something, but is there a way to control how arrays are
> marshaled during remoting? I know, that since they''re serializable and not
> MBR, they will be marshaled by value, but will they be transported back to
> the client? A server might change contents of an array, so remoting has no
> means to decide whether it happened and should pack it into the return
> message.
> So, my question is: is there a way to influence whether an array will or
> won''t be sent back to a client when remoting methods like these, and what is
> the default behavior:
>
> void Method( Array ar );
> - or -
> void Method( SomeClass[] ar );
>
> Thanks in advance,
> Gleb
>
>
>

Gleb Holodov

6/30/2004 2:07:00 PM

0

Aha! Thank you, Jason, I felt there should be something like this!