Microsoft   |   patterns & practices   |   Developer Network   |   Enterprise Library   |   Acceptance Testing Guide   |   Personal Site

Unity 2.0 container update - Grigori Melnik: Thoughts on Agile Software Engineering and Beyond - Site Home - MSDN Blogs

Unity 2.0 container update

Unity 2.0 container update

  • Comments 2

Our latest work on Unity 2.0 is available on Codeplex (see change set 28516). This is the first work we’ve done on Unity as part of the EntLib5.0 effort.

Major changes in this drop include:

  • ObjectBuilder2 DLL is now gone. The code is now completely contained in the Unity assembly, and you won't need to reference OB2 anymore in your projects using Unity. Over time the ObjectBuilder stuff is going to lose a lot of it's generality and be just the underpinnings for the container.
  • We're taking a first cut at fixing our exception messages. All the extra BuildFailedException’s that ended up in the inner exception tree are now GONE. Instead, you get a top level ResolutionFailedException, and the InnerException is the actual exception that caused resolution to fail. And the exception message has been reformatted significantly to hopefully get a better description of what the container was doing, and how it ended up where it did, when the error occurred. This is in response to user feedback to provide better error messaging in Unity. We consider this to be a significant improvement, but still need your feedback. In particular, we look forward to specific suggestions about how we could change the messages to be even more descriptive and intuitive. Please reply to this post or via Codeplex discussion thread.
  • Silverlight projects are now updated to Silverlight 3.
Comments
  • Congratulations guys! Nice to be watching Unity 2 take shape.

  • Have you fixed the bug that ResolveAll() does not return open generics?

    http://unity.codeplex.com/WorkItem/View.aspx?WorkItemId=3392

    I use quick fix in my project:

           public override IEnumerable<object> ResolveAll(Type t)

           {

               List<string> names = new List<string>(registeredNames.GetKeys(t));

               if (t.IsGenericType)

               {

                   Type tdef = t.GetGenericTypeDefinition();

                   names.AddRange(registeredNames.GetKeys(tdef));

               }

               foreach (string name in names)

               {

                   yield return Resolve(t, name);

               }

           }

Page 1 of 1 (2 items)
Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post