SolutionExtensions.InfoBarService.CreateInfoBar C# (CSharp) 메소드

CreateInfoBar() 개인적인 메소드

private CreateInfoBar ( IVsInfoBarHost host, string message ) : void
host IVsInfoBarHost
message string
리턴 void
        private void CreateInfoBar(IVsInfoBarHost host, string message)
        {
            InfoBarTextSpan text = new InfoBarTextSpan(message);
            InfoBarHyperlink install = new InfoBarHyperlink("Install extension...", "install");
            InfoBarHyperlink ignore = new InfoBarHyperlink("Ignore file type", "ignore");

            InfoBarTextSpan[] spans = new InfoBarTextSpan[] { text };
            InfoBarActionItem[] actions = new InfoBarActionItem[] { install, ignore };
            InfoBarModel infoBarModel = new InfoBarModel(spans, actions, KnownMonikers.VisualStudioFeedback, isCloseButtonVisible: true);

            var factory = _serviceProvider.GetService(typeof(SVsInfoBarUIFactory)) as IVsInfoBarUIFactory;
            IVsInfoBarUIElement element = factory.CreateInfoBar(infoBarModel);
            element.Advise(this, out _cookie);
            host.AddInfoBar(element);
        }