Beispiel #1
0
        public static PackageOptions GetOptions(IServiceProvider provider)
        {
            var options             = new PackageOptions();
            var dteProperties       = GetDteProperties(provider);
            var publicNoInheritance = BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly;

            foreach (var property in typeof(PackageOptions).GetProperties(publicNoInheritance))
            {
                property.SetValue(options, dteProperties.Item(property.Name).Value, null);
            }

            return(options);
        }
Beispiel #2
0
        private void Open(string url)
        {
            var options = PackageOptions.GetOptions(ServiceProvider);

            if (options.UseInternalWebBrowser)
            {
                OpenInternal(url);
            }
            else
            {
                Process.Start(url);
            }
        }
Beispiel #3
0
        public static PackageOptions GetOptions(IServiceProvider provider)
        {
            //TODO: One or more extensions were loaded using deprecated APIs. Don’t allow deprecated API usage [Recommended] Manage performance Don’t show this message for current extensions

            //ThreadHelper.ThrowIfNotOnUIThread();
            var options             = new PackageOptions();
            var dteProperties       = GetDteProperties(provider);
            var publicNoInheritance = BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly;

            foreach (var property in typeof(PackageOptions).GetProperties(publicNoInheritance))
            {
                property.SetValue(options, dteProperties.Item(property.Name).Value, null);
            }

            return(options);
        }