« Return to Thread: Proper way to register a custom type converter

Re: Proper way to register a custom type converter

by Cliff Meyers :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View in Thread

Hi All,

Update on this issue.  I was headed in the wrong direction with the
TypeConverter but here is what I have discovered:

If I try to send an object as the body of an AsyncMessage over RTMP,
all collection types in this object are sent as Array rather than
ArrayCollection.  Basically I am seeing the same behavior as if I were
to set "legacy-collection=true" on an AMFChannel.  Is there a way to
support sending of ArrayCollection over an RTMPChannel?  From what I
can tell there is no such "legacy-collection" property on RtmpChannel
or RtmpEndpoint and the logic to apply "legacy-collection" behavior
via filters only exists in AMFEndpoint.

Thanks,

-Cliff


On Sat, Apr 4, 2009 at 10:23 PM, Cliff Meyers <cliff.meyers@...> wrote:

> Hi All,
>
> I was wondering what is the proper way to register a custom type
> converter.  We've created one so that we can handle
> System.Collections.Generic.IList appropriately and it works fine with
> RPC / RemoteObject calls.  However it doesn't appear to be getting
> picked up when we push messages over RTMP; any instances of IList come
> back to the client as null.  Right now we use the following code in
> Global.asax:
>
> void Application_Start(object sender, EventArgs e) {
>        System.ComponentModel.TypeDescriptor.AddAttributes(
>            typeof(FluorineFx.AMF3.ArrayCollection),
>            new Attribute[] {
>                new
> System.ComponentModel.TypeConverterAttribute(typeof(NCash.GenericCollectionTypeConverter))
>            }
>        );
>    }
>
> It seems like there should be another place to do this, perhaps in
> Web.config in the Fluorine sections?
>
> Thanks,
>
> -Cliff
>

_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

 « Return to Thread: Proper way to register a custom type converter