public static ILinkViewer Create(LibraryObjectLink sourceLink) { return ObjectIntendHelper.GetObjectInstances( typeof(ILinkViewer), EntitySettingsResolver.ExtractObjectTypeFromProxy(sourceLink.GetType()), sourceLink) .OfType<ILinkViewer>() .FirstOrDefault() ?? new CommonFileViewer(sourceLink); }
public static ILinkViewProcessor Create(LibraryObjectLink link) { return ObjectIntendHelper.GetObjectInstances( typeof(ILinkViewProcessor), EntitySettingsResolver.ExtractObjectTypeFromProxy(link.GetType()), link) .OfType<ILinkViewProcessor>() .FirstOrDefault() ?? new CommonFileLinkProcessor((LibraryFileLink)link); }