ViewFactoryEntry CreateViewFactoryEntry(ViewFactoryAttribute a, Type factoryType, IViewFactory factory) { var entry = new ViewFactoryEntry(this) { RegisteredName = a.RegisteredName, DisplayName = factory.GetViewDisplayName(a.RegisteredName), TypeName = factoryType.AssemblyQualifiedName, IsSingleInstance = a.IsSingleInstance, IsSingleInstancePerLayout = a.IsSingleInstancePerLayout, IsInternalOnly = a.IsInternalOnly, DefaultShortcutKey = string.IsNullOrEmpty(a.DefaultShortcutKey) ? string.Empty : a.DefaultShortcutKey.ToUpperInvariant(), Factory = factory }; if (!string.IsNullOrEmpty(a.DocumentAffinities)) { entry.DocumentFactoryAffinities.AddRange(a.DocumentAffinities.Split('|')); } return(entry); }