Injection of System.Int64 alias long values

Jun 24, 2009 at 12:04 PM

Hello

It's driving me crazy. I really don't get how to inject long values into a constructor or a property. When I use as parameterType System.Int64, mscorlib I receive always a exception that the type could not be build up.

 

                            <constructor>
                                <param name="portalAddress" parameterType="System.String, mscorlib">
                                    <value value="http://google.ch"/>
                                </param>
                                <param name="observationInterval" parameterType="System.Int64, mscorlib">
                                    <value value="300L"/>
                                </param>
                                <param name="firstCheckInterval" parameterType="System.Int64, mscorlib">
                                    <value value="-1L"/>
                                </param>
                            </constructor>

I tried different variations without L appending to the value. Using "long" as type alias. Nothing works. Has anyone an idea?

 

Thanks for the help

 

Jun 24, 2009 at 1:03 PM

You should specify the "type" attribute for the <value> element (type="System.Int64").  If you don't it assumes it is of type string even if you specify the parameterTye in the <param> element.

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

 

 

Jun 24, 2009 at 1:18 PM

Thanks!!! You are my day and nerve saver!

Daniel