コード例 #1
0
		public static ILinkViewer Create(LibraryObjectLink sourceLink)
		{
			return ObjectIntendHelper.GetObjectInstances(
					typeof(ILinkViewer),
					EntitySettingsResolver.ExtractObjectTypeFromProxy(sourceLink.GetType()),
					sourceLink)
				.OfType<ILinkViewer>()
				.FirstOrDefault() ?? new CommonFileViewer(sourceLink);
		}
コード例 #2
0
		public static ILinkViewProcessor Create(LibraryObjectLink link)
		{
			return ObjectIntendHelper.GetObjectInstances(
					typeof(ILinkViewProcessor),
					EntitySettingsResolver.ExtractObjectTypeFromProxy(link.GetType()),
					link)
				.OfType<ILinkViewProcessor>()
				.FirstOrDefault() ?? new CommonFileLinkProcessor((LibraryFileLink)link);
		}