Beispiel #1
0
    public T GetFeature <T>(string integrationType) where T : IIntegrationFeature
    {
        IChannelIntegration integration = integrationFactory.CreateIntegration(integrationType);
        var feature = integration.GetFeature <T>();

        return(feature);
    }
Beispiel #2
0
    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);
    }
Beispiel #3
0
    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);
    }