public IntelligentTaggingController(
            IWebUtilWrapper webUtil,
            ISitecoreDataWrapper dataWrapper,
            IIntelligentTaggingSettings settings,
            ISetupInformationFactory setupFactory,
            ISetupService setupService,
            IContentSearchWrapper contentSearch,
            INaturalLanguageClassifierService naturalLanguageClassifier,
            IContentService contentService,
            IContentSearchService contentSearchService,
            IClassifierFactory classifierFactory)
        {
            WebUtil                   = webUtil;
            DataWrapper               = dataWrapper;
            Settings                  = settings;
            SetupFactory              = setupFactory;
            SetupService              = setupService;
            ContentSearch             = contentSearch;
            NaturalLanguageClassifier = naturalLanguageClassifier;
            ContentService            = contentService;
            ContentSearchService      = contentSearchService;
            ClassifierFactory         = classifierFactory;

            Id       = WebUtil.GetQueryString("id");
            Language = WebUtil.GetQueryString("language");
            Database = WebUtil.GetQueryString("db");
        }
Example #2
0
        public OleChatController(
            ILuisService luisService,
            ILuisConversationService luisConversationService,
            IWebUtilWrapper webUtil,
            ISitecoreDataWrapper dataWrapper,
            IOleSettings chatSettings,
            ISetupInformationFactory setupFactory,
            ISetupService setupService,
            ISpeechService speechService,
            ISearchService searcher,
            IConversationContextFactory conversationContextFactory,
            ISpellCheckService spellCheckService,
            IIntentProvider intentProvider)
        {
            LuisService             = luisService;
            LuisConversationService = luisConversationService;
            WebUtil       = webUtil;
            DataWrapper   = dataWrapper;
            ChatSettings  = chatSettings;
            SetupFactory  = setupFactory;
            SetupService  = setupService;
            SpeechService = speechService;
            Searcher      = searcher;
            ConversationContextFactory = conversationContextFactory;
            SpellCheckService          = spellCheckService;
            IntentProvider             = intentProvider;
            ThemeManager.GetImage("Office/32x32/man_8.png", 32, 32);

            var lang = WebUtil.GetQueryString("language");

            if (string.IsNullOrWhiteSpace(lang))
            {
                lang = Sitecore.Context.Language.Name;
            }

            var db = WebUtil.GetQueryString("db");

            if (string.IsNullOrWhiteSpace(db))
            {
                db = "master";
            }

            Parameters = new ItemContextParameters()
            {
                Id       = WebUtil.GetQueryString("id"),
                Language = lang,
                Database = db
            };
        }
Example #3
0
        public IntelligentMediaController(
            IIntelligentMediaSearchService searchService,
            ISitecoreDataWrapper dataWrapper,
            IWebUtilWrapper webUtil,
            IImageSearchFactory msFactory,
            ISetAltTagsAllFactory satarFactory,
            IImageAnalysisService analysisService,
            IJobResultFactory jobResultFactory,
            ISetupInformationFactory setupFactory,
            ISetupService setupService,
            IIntelligentMediaSettings searchSettings,
            IFaceService faceService,
            IPersonGroupService personGroupService,
            IComputerVisionService computerVisionService,
            IMediaWrapper mediaWrapper)
        {
            Assert.IsNotNull(searchService, typeof(IIntelligentMediaSearchService));
            Assert.IsNotNull(dataWrapper, typeof(ISitecoreDataWrapper));
            Assert.IsNotNull(webUtil, typeof(IWebUtilWrapper));
            Assert.IsNotNull(msFactory, typeof(IImageSearchFactory));
            Assert.IsNotNull(satarFactory, typeof(ISetAltTagsAllFactory));
            Assert.IsNotNull(analysisService, typeof(IImageAnalysisService));
            Assert.IsNotNull(jobResultFactory, typeof(IJobResultFactory));
            Assert.IsNotNull(setupFactory, typeof(ISetupInformationFactory));
            Assert.IsNotNull(setupService, typeof(ISetupService));
            Assert.IsNotNull(searchSettings, typeof(IIntelligentMediaSettings));
            Assert.IsNotNull(faceService, typeof(IFaceService));
            Assert.IsNotNull(personGroupService, typeof(IPersonGroupService));
            Assert.IsNotNull(computerVisionService, typeof(IComputerVisionService));
            Assert.IsNotNull(mediaWrapper, typeof(IMediaWrapper));

            SearchService         = searchService;
            DataWrapper           = dataWrapper;
            WebUtil               = webUtil;
            MediaSearchFactory    = msFactory;
            SetAltTagsAllFactory  = satarFactory;
            AnalysisService       = analysisService;
            JobResultFactory      = jobResultFactory;
            SetupFactory          = setupFactory;
            SetupService          = setupService;
            SearchSettings        = searchSettings;
            FaceService           = faceService;
            PersonGroupService    = personGroupService;
            ComputerVisionService = computerVisionService;
            MediaWrapper          = mediaWrapper;
        }
        public void Setup()
        {
            SearchService           = Substitute.For <IIntelligentMediaSearchService>();
            DataWrapper             = Substitute.For <ISitecoreDataWrapper>();
            WebUtil                 = Substitute.For <IWebUtilWrapper>();
            MediaSearchFactory      = Substitute.For <IImageSearchFactory>();
            SetAltTagsAllFactory    = Substitute.For <ISetAltTagsAllFactory>();
            ImageAnalysisFactory    = Substitute.For <IImageAnalysisFactory>();
            ImageAnalysisService    = Substitute.For <IImageAnalysisService>();
            JobResultFactory        = Substitute.For <IJobResultFactory>();
            SetupInformationFactory = Substitute.For <ISetupInformationFactory>();
            Settings                = Substitute.For <IIntelligentMediaSettings>();
            SetupService            = Substitute.For <ISetupService>();

            User u = User.FromName("sitecore\\name", true);

            DataWrapper.ContextUser.Returns(u);
        }
 public SetupService(
     ISitecoreDataWrapper dataWrapper,
     ISetupInformationFactory setupFactory,
     IMicrosoftCognitiveServicesApiKeys mscsApiKeys,
     IImageSearchSettings searchSettings,
     IImageAnalysisService analysisService,
     IImageSearchService searchService,
     IPublishWrapper publishWrapper,
     HttpContextBase context)
 {
     DataWrapper     = dataWrapper;
     SetupFactory    = setupFactory;
     MSCSApiKeys     = mscsApiKeys;
     SearchSettings  = searchSettings;
     AnalysisService = analysisService;
     SearchService   = searchService;
     Context         = context;
     PublishWrapper  = publishWrapper;
 }
        public CognitiveImageSearchController(
            IImageSearchService searchService,
            ISitecoreDataWrapper dataWrapper,
            IWebUtilWrapper webUtil,
            ICognitiveImageSearchFactory msFactory,
            ISetAltTagsAllFactory satarFactory,
            IAnalyzeAllFactory pFactory,
            IImageAnalysisService analysisService,
            IAnalysisJobResultFactory jobResultFactory,
            ISetupInformationFactory setupFactory,
            ISetupService setupService,
            IImageSearchSettings searchSettings)
        {
            Assert.IsNotNull(searchService, typeof(IImageSearchService));
            Assert.IsNotNull(dataWrapper, typeof(ISitecoreDataWrapper));
            Assert.IsNotNull(webUtil, typeof(IWebUtilWrapper));
            Assert.IsNotNull(msFactory, typeof(ICognitiveImageSearchFactory));
            Assert.IsNotNull(satarFactory, typeof(ISetAltTagsAllFactory));
            Assert.IsNotNull(pFactory, typeof(IAnalyzeAllFactory));
            Assert.IsNotNull(analysisService, typeof(IImageAnalysisService));
            Assert.IsNotNull(jobResultFactory, typeof(IAnalysisJobResultFactory));
            Assert.IsNotNull(setupFactory, typeof(ISetupInformationFactory));
            Assert.IsNotNull(setupService, typeof(ISetupService));
            Assert.IsNotNull(searchSettings, typeof(IImageSearchSettings));

            SearchService        = searchService;
            DataWrapper          = dataWrapper;
            WebUtil              = webUtil;
            MediaSearchFactory   = msFactory;
            SetAltTagsAllFactory = satarFactory;
            AnalyzeAllFactory    = pFactory;
            AnalysisService      = analysisService;
            JobResultFactory     = jobResultFactory;
            SetupFactory         = setupFactory;
            SetupService         = setupService;
            SearchSettings       = searchSettings;
        }
        public CognitiveOleChatController(
            IConversationService conversationService,
            IWebUtilWrapper webUtil,
            ISitecoreDataWrapper dataWrapper,
            IOleSettings chatSettings,
            ISetupInformationFactory setupFactory,
            ISetupService setupService)
        {
            ConversationService = conversationService;
            WebUtil             = webUtil;
            DataWrapper         = dataWrapper;
            ChatSettings        = chatSettings;
            SetupFactory        = setupFactory;
            SetupService        = setupService;

            Parameters = new ItemContextParameters()
            {
                Id       = WebUtil.GetQueryString("id"),
                Language = WebUtil.GetQueryString("language"),
                Database = WebUtil.GetQueryString("db")
            };

            ThemeManager.GetImage("Office/32x32/man_8.png", 32, 32);
        }