private void LoadModel(Assembly assembly, object[] attributes, int i, ModelMetadataAttribute metadata) { var model = serializer.Deserialize(assembly.GetManifestResourceStream(metadata.ResourceName), metadata.ModelUri, this, true); for (int j = i + 1; j < attributes.Length; j++) { var followingAttribute = attributes[j] as ModelMetadataAttribute; if (followingAttribute != null) { var followUri = new Uri(followingAttribute.ModelUri, MakeRelativePath(metadata.ResourceName, followingAttribute.ResourceName)); if (!entries.ContainsKey(followUri)) { entries.Add(followUri, model); } } } }