SL & WP assemblies

Oct 17, 2012 at 6:42 PM

Could you provide SL4, SL5  & WP assemblies?

Coordinator
Oct 18, 2012 at 4:37 AM

Yes. I'll try to include them in the next release. It won't be far in the future.

Oct 18, 2012 at 4:01 PM

I was able to port almost all your code to SL4, SL5 & WP. Just was excluded System.Drawing namespace and the HashSet

I just built my own unofficial version of the assamblies. I will wait for the official one, but now I can work ;)

I just have an issue.

Why you do this

            Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();

            // first search the 1st assembly (i.e. the mscorlib), then start from the last assembly backward,
            // the last assemblies are user defined ones
            for(int i = assemblies.Length; i > 0; i--)
            {
                Assembly curAssembly = (i == assemblies.Length) ? assemblies[0] : assemblies[i];

                try
                {
                    Type type = curAssembly.GetType(name, false, true);
                    if (type != null)
                        return type;
                }
                catch
                {
                }
            }

instead just this:

             return Type.GetType(name, false, true);

in the GetTypeByName method implementation?

 

Coordinator
Oct 18, 2012 at 10:49 PM

Well, that's for a few years ago. As I remember, that method could not load a user-defined type from the user's assembly by name. That loop was only to give priorities to different assemblies just to make it a little faster.