private static bool IsViewModelForType([NotNull] this IExport <object> item, [NotNull] Type viewModel, [CanBeNull] object?role)
        {
            var itemMetadata = item.Metadata;

            if (itemMetadata == null)
            {
                return(false);
            }

            var templateMetadata = new DataTemplateMetadata(itemMetadata);

            return((templateMetadata.DataType == viewModel) && RoleEquals(templateMetadata.Role, role));
        }
        private static bool IsViewModelForType([CanBeNull] this IExport <object> item, [CanBeNull] Type viewModel, [CanBeNull] object role)
        {
            var metadata = new DataTemplateMetadata(item?.Metadata);

            return((metadata.DataType == viewModel) && RoleEquals(metadata.Role, role));
        }