public T GetFeature <T>(string integrationType) where T : IIntegrationFeature { IChannelIntegration integration = integrationFactory.CreateIntegration(integrationType); var feature = integration.GetFeature <T>(); return(feature); }
public T GetFeature <T>(string integrationType) where T : IIntegrationFeature { T integrationFeature = default(T); IChannelIntegration integration = integrationFactory.CreateIntegration(integrationType); if (integration != null) { integrationFeature = (T)integration.GetFeature <T>(); } return(integrationFeature); }
public IChannelIntegration CreateIntegration(string integrationType) { IChannelIntegration integration = null; switch (integrationType) { case "MobileIntegration": integration = new MobileIntegration(); break; case "DesktopIntegration": integration = new DesktopIntegration(); break; } return(integration); }
public IChannelIntegration CreateIntegration(string integrationType) { IChannelIntegration integration = null; switch (integrationType) { case "MobileIntegration": integration = new ChannelIntegration(); integration.Register <ITapGestureTrack>(new TapGestureTrack()); break; case "DesktopIntegration": integration = new ChannelIntegration(); integration.Register <IClickTrack>(new ClickTracker()); integration.Register <ILargeImagesProvider>(new LargeImagesProvider()); break; } return(integration); }