Example #1
0
 public Excel(IRiffConfigurableSettings riffConfigurableSettings, ISpeechContext speechContext)
     : base(riffConfigurableSettings, speechContext)
 {
     m_applicationName = "Excel";
     this.SetCommonApplicationBasePathOverride(m_baseApplicationPathName, m_executableName);
     this.SetApplicationPath();
 }
Example #2
0
 public Chrome(IRiffConfigurableSettings riffConfigurableSettings, ISpeechContext speechContext)
     : base(riffConfigurableSettings, speechContext)
 {
     m_applicationName = "Chrome";
     this.SetApplicationPath();
     m_additionalAppStartMessage = "Happy browsing";
 }
Example #3
0
 public Slack(IRiffConfigurableSettings riffConfigurableSettings, ISpeechContext speechContext)
     : base(riffConfigurableSettings, speechContext)
 {
     m_applicationName = "Slack";
     this.SetApplicationPath();
     m_additionalAppStartMessage = "Message away";
 }
Example #4
0
 public Outlook(IRiffConfigurableSettings riffConfigurableSettings, ISpeechContext speechContext)
     : base(riffConfigurableSettings, speechContext)
 {
     m_applicationName = "Outlook";
     this.SetApplicationPath();
     SetAlternateAliasForApplciation();
 }
Example #5
0
 public Word(IRiffConfigurableSettings riffConfigurableSettings, ISpeechContext speechContext)
     : base(riffConfigurableSettings, speechContext)
 {
     m_applicationName = "Word";
     this.SetCommonApplicationBasePathOverride(m_baseApplicationPathName, m_executableName);
     this.SetApplicationPath();
     SetAlternateAliasForApplciation();
 }
        private static void RegisterApplications(ContainerBuilder builder,
                                                 IRiffConfigurableSettings riffConfigurableSettings,
                                                 ISpeechContext speechContext)
        {
            builder.RegisterType <Chrome>()
            .As <Chrome>()
            .WithParameter(new TypedParameter(typeof(IRiffConfigurableSettings), riffConfigurableSettings))
            .WithParameter(new TypedParameter(typeof(ISpeechContext), speechContext))
            .AsSelf();

            builder.RegisterType <Word>()
            .As <Word>()
            .WithParameter(new TypedParameter(typeof(IRiffConfigurableSettings), riffConfigurableSettings))
            .WithParameter(new TypedParameter(typeof(ISpeechContext), speechContext))
            .AsSelf();

            builder.RegisterType <Powerpoint>()
            .As <Powerpoint>()
            .WithParameter(new TypedParameter(typeof(IRiffConfigurableSettings), riffConfigurableSettings))
            .WithParameter(new TypedParameter(typeof(ISpeechContext), speechContext))
            .AsSelf();

            builder.RegisterType <Excel>()
            .As <Excel>()
            .WithParameter(new TypedParameter(typeof(IRiffConfigurableSettings), riffConfigurableSettings))
            .WithParameter(new TypedParameter(typeof(ISpeechContext), speechContext))
            .AsSelf();

            builder.RegisterType <Slack>()
            .As <Slack>()
            .WithParameter(new TypedParameter(typeof(IRiffConfigurableSettings), riffConfigurableSettings))
            .WithParameter(new TypedParameter(typeof(ISpeechContext), speechContext))
            .AsSelf();

            var outlook = new Outlook(riffConfigurableSettings, speechContext);

            builder.RegisterInstance(outlook)
            .As <Outlook>()
            .AsSelf();

            builder.RegisterType <Calendar>()
            .As <Calendar>()
            .WithParameter(new TypedParameter(typeof(ISpeechContext), speechContext))
            .WithParameter(new TypedParameter(typeof(Outlook), outlook))
            .SingleInstance();

            //  m_appContainer = builder.Build();
        }
 public AbstractApplicationContext(IRiffConfigurableSettings riffConfigurableSettings, ISpeechContext speechContext)
     : base(speechContext)
 {
     m_supportedApplications     = riffConfigurableSettings.SupportedApplications();
     m_alternateApplicationAlias = new List <string>();
 }