Beispiel #1
0
        public static BitmapSource MonikerToBitmap(ImageMoniker moniker, int size)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            var shell           = ServiceUtil.GetService <SVsUIShell, IVsUIShell5>();
            var backgroundColor = shell.GetThemedColorRgba(EnvironmentColors.MainWindowButtonActiveBorderBrushKey);

            var imageAttributes = new ImageAttributes
            {
                Flags = (uint)_ImageAttributesFlags.IAF_RequiredFlags | unchecked ((uint)_ImageAttributesFlags.IAF_Background),
                //Flags = (uint)_ImageAttributesFlags.IAF_RequiredFlags,
                ImageType     = (uint)_UIImageType.IT_Bitmap,
                Format        = (uint)_UIDataFormat.DF_WPF,
                Dpi           = 96,
                LogicalHeight = size,
                LogicalWidth  = size,
                Background    = backgroundColor,
                StructSize    = Marshal.SizeOf(typeof(ImageAttributes))
            };

            var         service = ServiceUtil.GetService <SVsImageService, IVsImageService2>();
            IVsUIObject result  = service.GetImage(moniker, imageAttributes);

            result.get_Data(out object data);

            return(data as BitmapSource);
        }
        public Image CreateImage(IMonikerAttributes monikerAttributes, IVsUIObject vsUiObject)
        {
            try
            {
                if (vsUiObject == null)
                {
                    return(null);
                }

                var colorType   = monikerAttributes.GetColorType();
                var themedColor = _imageDataProvider.GetThemedColor(colorType);

                if (!themedColor.HasValue)
                {
                    return(null);
                }

                var imageMoniker = _imageDataProvider.GetImageMoniker(vsUiObject);
                var image        = _imageDataProvider.GetImage(imageMoniker, themedColor.Value);

                return(image);
            }
            catch
            {
                return(null);
            }
        }
Beispiel #3
0
        public static ImageSource GetIconForImageMoniker(ImageMoniker imageMoniker)
        {
            IVsImageService2 imageService = VsAppShell.Current.GlobalServices.GetService <IVsImageService2>(typeof(SVsImageService));
            ImageSource      glyph        = null;

            ImageAttributes imageAttributes = new ImageAttributes();

            imageAttributes.Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags;
            imageAttributes.ImageType     = (uint)_UIImageType.IT_Bitmap;
            imageAttributes.Format        = (uint)_UIDataFormat.DF_WPF;
            imageAttributes.LogicalHeight = 16; // IconHeight,
            imageAttributes.LogicalWidth  = 16; // IconWidth,
            imageAttributes.StructSize    = Marshal.SizeOf(typeof(ImageAttributes));

            IVsUIObject result = imageService.GetImage(imageMoniker, imageAttributes);

            Object data = null;

            if (result.get_Data(out data) == VSConstants.S_OK)
            {
                glyph = data as ImageSource;
                if (glyph != null)
                {
                    glyph.Freeze();
                }
            }

            return(glyph);
        }
Beispiel #4
0
        private static ImageSource GetImage(IVsImageService2 imageService, ImageMoniker imageMoniker)
        {
            var imageAttributes = new ImageAttributes {
                ImageType     = (uint)_UIImageType.IT_Bitmap,
                Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags,
                Format        = (uint)_UIDataFormat.DF_WPF,
                LogicalHeight = 16,
                LogicalWidth  = 16,
                StructSize    = Marshal.SizeOf(typeof(ImageAttributes))
            };

            IVsUIObject uiObject = imageService.GetImage(imageMoniker, imageAttributes);

            object data;

            if (uiObject.get_Data(out data) != VSConstants.S_OK)
            {
                return(null);
            }

            var imageSource = data as ImageSource;

            imageSource?.Freeze();
            return(imageSource);
        }
Beispiel #5
0
        private static ImageSource GetImage(DependencyObject owner, string file, __VSUIDATAFORMAT format, out bool themeIcon)
        {
            IVsImageService imageService = ServiceProvider.GlobalProvider.GetService(typeof(SVsImageService)) as IVsImageService;
            BitmapSource    result       = null;
            uint            iconSource   = (uint)__VSIconSource.IS_Unknown;

            if (imageService != null && !string.IsNullOrWhiteSpace(file))
            {
                IVsUIObject image = imageService.GetIconForFileEx(file, format, out iconSource);
                if (image != null)
                {
                    object imageData = GetObjectData(image);
                    result = imageData as BitmapSource;
                }
            }

            themeIcon = (iconSource == (uint)__VSIconSource.IS_VisualStudio);

            if (themeIcon && result != null && owner != null)
            {
                return(ThemeImage(owner, result));
            }

            return(result);
        }
        public static BitmapSource GetImage(ImageMoniker moniker, int size)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            var imageAttributes = new ImageAttributes
            {
                Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags,
                ImageType     = (uint)_UIImageType.IT_Bitmap,
                Format        = (uint)_UIDataFormat.DF_WPF,
                Dpi           = 96,
                LogicalHeight = size,
                LogicalWidth  = size,
                StructSize    = Marshal.SizeOf(typeof(ImageAttributes)),
            };

            IVsUIObject result = _imageService.GetImage(moniker, imageAttributes);

            result.get_Data(out object data);

            if (data == null)
            {
                return(null);
            }

            return(data as BitmapSource);
        }
Beispiel #7
0
        public static BitmapSource GetIconForImageMoniker(ImageMoniker?imageMoniker, int sizeX, int sizeY)
        {
            if (imageMoniker == null)
            {
                return(null);
            }

            var vsIconService = ServiceProvider.GlobalProvider.GetService(typeof(SVsImageService)) as IVsImageService2;

            if (vsIconService == null)
            {
                return(null);
            }

            var imageAttributes = new ImageAttributes
            {
                Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags,
                ImageType     = (uint)_UIImageType.IT_Bitmap,
                Format        = (uint)_UIDataFormat.DF_WPF,
                LogicalHeight = sizeY,
                LogicalWidth  = sizeX,
                StructSize    = Marshal.SizeOf(typeof(ImageAttributes))
            };

            IVsUIObject result = vsIconService.GetImage(imageMoniker.Value, imageAttributes);

            result.get_Data(out object data);
            var glyph = data as BitmapSource;

            glyph?.Freeze();

            return(glyph);
        }
        private static object GetData(IVsUIObject icon)
        {
            object data;

            icon.get_Data(out data);

            return data;
        }
        private static object GetData(IVsUIObject icon)
        {
            object data;

            icon.get_Data(out data);

            return(data);
        }
 public StackOverflowSearchItemResult(string name, string description, string url, IVsUIObject icon, IVsSearchProvider provider)
 {
     DisplayText = name;
     Url = url;
     Icon = icon;
     PersistenceData = name + "|" + Url;
     Description = description;
     SearchProvider = provider;
 }
        public Bitmap GetImageMoniker(IVsUIObject vsUiObject)
        {
            var objectData = Utilities.GetObjectData(vsUiObject);
            var image      = (Bitmap)objectData;

            image.MakeTransparent(Color.Transparent);

            return(image);
        }
Beispiel #12
0
 public StackOverflowSearchItemResult(string name, string description, string url, IVsUIObject icon, IVsSearchProvider provider)
 {
     DisplayText     = name;
     Url             = url;
     Description     = description;
     Icon            = icon;
     PersistenceData = name + "|" + url + "|" + description;
     SearchProvider  = provider;
 }
Beispiel #13
0
            private bool AreEqual(IVsUIObject other) {
                if (ReferenceEquals(this, other)) {
                    return true;
                }

                object otherData;
                Marshal.ThrowExceptionForHR(other.get_Data(out otherData));
                return object.Equals(otherData, _data);
            }
Beispiel #14
0
        /// <summary>
        /// Converts an ImageMoniker to a bitmap in the specified size.
        /// </summary>
        /// <remarks>
        /// The background color matches the one in the current Visual Studio theme and changes
        /// dynamically with changes to the applied theme.
        /// </remarks>
        /// <example>
        /// <code>
        /// BitmapSource bitmap = await KnownMonikers.Reference.ToBitmapSourceAsync(16);
        /// </code>
        /// </example>
        public static async Task <BitmapSource> ToBitmapSourceAsync(this ImageMoniker moniker, int size)
        {
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            IVsUIObject result = await ToUiObjectAsync(moniker, size);

            ErrorHandler.ThrowOnFailure(result.get_Data(out var data));

            return(data as BitmapSource);
        }
Beispiel #15
0
        public static IVsUIObject Create()
        {
            object      outValue = null;
            IVsUIObject obj      = Substitute.For <IVsUIObject>();

            obj.get_Data(out outValue).ReturnsForAnyArgs(x => {
                x[0] = Resources.SampleImage;
                return(VSConstants.S_OK);
            });
            return(obj);
        }
Beispiel #16
0
            private bool AreEqual(IVsUIObject other)
            {
                if (ReferenceEquals(this, other))
                {
                    return(true);
                }

                object otherData;

                Marshal.ThrowExceptionForHR(other.get_Data(out otherData));
                return(object.Equals(otherData, _data));
            }
Beispiel #17
0
        private static object GetObjectData(IVsUIObject obj)
        {
            Validate.IsNotNull(obj, "obj");

            int result = obj.get_Data(out object value);

            if (result != VSConstants.S_OK)
            {
                throw new COMException("Could not get object data", result);
            }

            return(value);
        }
        //https://msdn.microsoft.com/en-us/library/mt628927.aspx?f=255&MSPPError=-2147217396
        public Icon GetIcon(IClosedDocument document)
        {
            Icon icon = null;

            if (!string.IsNullOrWhiteSpace(document?.Name))
            {
                IVsUIObject uIObj = _vsImageService2.GetIconForFile(document.Name, __VSUIDATAFORMAT.VSDF_WINFORMS);
                if (uIObj != null)
                {
                    icon = (Icon)GelUtilities.GetObjectData(uIObj);
                }
            }

            return(icon);
        }
Beispiel #19
0
        public static BitmapSource GetIcon(ItemType itemType)
        {
            var imageService = (IVsImageService2)Package.GetGlobalService(typeof(SVsImageService));

            ImageAttributes imageAttributes = new ImageAttributes();

            imageAttributes.Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags;
            imageAttributes.ImageType     = (uint)_UIImageType.IT_Bitmap;
            imageAttributes.Format        = (uint)_UIDataFormat.DF_WPF;
            imageAttributes.LogicalHeight = 16;
            imageAttributes.LogicalWidth  = 16;
            imageAttributes.StructSize    = Marshal.SizeOf(typeof(ImageAttributes));

            // Replace this KnownMoniker with your desired ImageMoniker
            IVsUIObject imageObject = imageService.GetImage(KnownMonikers.Blank, imageAttributes);

            switch (itemType)
            {
            case ItemType.Solution:
            {
                imageObject = imageService.GetImage(KnownMonikers.Solution, imageAttributes);
                break;
            }

            case ItemType.Project:
            {
                imageObject = imageService.GetImage(KnownMonikers.CSProjectNode, imageAttributes);
                break;
            }

            case ItemType.File:
            {
                imageObject = imageService.GetImage(KnownMonikers.CSFileNode, imageAttributes);
                break;
            }

            case ItemType.Method:
            {
                imageObject = imageService.GetImage(KnownMonikers.MethodPublic, imageAttributes);
                break;
            }
            }
            Object data;

            imageObject.get_Data(out data);
            return(data as BitmapSource);
        }
        public static ImageSource GetIconForImageMoniker(ImageMoniker?imageMoniker, int sizeX, int sizeY)
        {
            if (imageMoniker == null)
            {
                return(null);
            }

            IVsImageService2 vsIconService = ServiceProvider.GlobalProvider.GetService(typeof(SVsImageService)) as IVsImageService2;

            if (vsIconService == null)
            {
                return(null);
            }

            try
            {
                ImageAttributes imageAttributes = new ImageAttributes
                {
                    Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags,
                    ImageType     = (uint)_UIImageType.IT_Bitmap,
                    Format        = (uint)_UIDataFormat.DF_WPF,
                    LogicalHeight = sizeY,
                    LogicalWidth  = sizeX,
                    StructSize    = Marshal.SizeOf(typeof(ImageAttributes))
                };

                IVsUIObject result = vsIconService.GetImage(imageMoniker.Value, imageAttributes);

                object data;
                result.get_Data(out data);
                ImageSource glyph = data as ImageSource;

                if (glyph != null)
                {
                    glyph.Freeze();
                }

                return(glyph);
            }
            catch
            {
                Debug.Fail("Unable to get image.");
            }

            return(null);
        }
Beispiel #21
0
        /// <summary>
        /// Get the image based on the moniker, backColor and dimensions
        /// </summary>
        public static Bitmap GetImage(ImageMoniker moniker, System.Drawing.Color backColor, int height, int width, bool scalingRequired)
        {
            m_attributes.Background    = (uint)backColor.ToArgb();
            m_attributes.LogicalHeight = height;
            m_attributes.LogicalWidth  = width;

            if (scalingRequired)
            {
                m_attributes.LogicalHeight = (int)(height * DpiHelper.LogicalToDeviceUnitsScalingFactorY);
                m_attributes.LogicalWidth  = (int)(width * DpiHelper.LogicalToDeviceUnitsScalingFactorX);
            }

            IVsUIObject uIObjOK = ImageService.GetImage(moniker, m_attributes);
            Bitmap      bitmap  = (Bitmap)UIUtilities.GetObjectData(uIObjOK);

            bitmap.MakeTransparent(System.Drawing.Color.Magenta);

            return(bitmap);
        }
Beispiel #22
0
        /// <summary>
        /// Load and display an image moniker in a PictureBox
        /// </summary>
        private void LoadMoniker(object sender, EventArgs e)
        {
            IVsImageService2 imageService = (IVsImageService2)OptionsPagePackageCS.GetGlobalService(typeof(SVsImageService));

            ImageAttributes attributes = new ImageAttributes
            {
                StructSize    = Marshal.SizeOf(typeof(ImageAttributes)),
                ImageType     = (uint)_UIImageType.IT_Bitmap,
                Format        = (uint)_UIDataFormat.DF_WinForms,
                LogicalWidth  = 32,
                LogicalHeight = 32,
                // Desired RGBA color, don't set IAF_Background below unless you also use this
                Background = 0xFFFFFFFF,
                // (uint)(_ImageAttributesFlags.IAF_RequiredFlags | _ImageAttributesFlags.IAF_Background)
                Flags = (uint)_ImageAttributesFlags.IAF_RequiredFlags,
            };

            IVsUIObject uIObj = imageService.GetImage(KnownMonikers.Search, attributes);

            bitmapPictureBox.Image = (Bitmap)GelUtilities.GetObjectData(uIObj);
        }
        public static BitmapSource ToBitmap(this ImageMoniker moniker, int size)
        {
            Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();

            _imageService = _imageService ?? ServiceProvider.GlobalProvider.GetService <SVsImageService, IVsImageService2>();

            var imageAttributes = new ImageAttributes
            {
                Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags,
                ImageType     = (uint)_UIImageType.IT_Bitmap,
                Format        = (uint)_UIDataFormat.DF_WPF,
                LogicalHeight = size,
                LogicalWidth  = size,
                StructSize    = Marshal.SizeOf(typeof(ImageAttributes))
            };

            IVsUIObject result = _imageService.GetImage(moniker, imageAttributes);

            result.get_Data(out object data);

            return(data as BitmapSource);
        }
Beispiel #24
0
        private Icon GetWarningIcon()
        {
            if (WarningIcon == null)
            {
                ImageAttributes attributes = new ImageAttributes
                {
                    StructSize    = Marshal.SizeOf(typeof(ImageAttributes)),
                    ImageType     = (uint)_UIImageType.IT_Icon,
                    Format        = (uint)_UIDataFormat.DF_WinForms,
                    LogicalWidth  = 16,
                    LogicalHeight = 16,
                    Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags
                };

                IVsImageService2 imageService = (IVsImageService2)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SVsImageService));
                IVsUIObject      uIObj        = imageService.GetImage(KnownMonikers.StatusWarning, attributes);

                WarningIcon = (Icon)GelUtilities.GetObjectData(uIObj);
            }

            return(WarningIcon);
        }
Beispiel #25
0
        public static BitmapSource GetImage(ImageMoniker moniker)
        {
            var imageAttributes = new ImageAttributes()
            {
                Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags,
                ImageType     = (uint)_UIImageType.IT_Bitmap,
                Format        = (uint)_UIDataFormat.DF_WPF,
                LogicalHeight = 16,
                LogicalWidth  = 16,
                StructSize    = Marshal.SizeOf(typeof(ImageAttributes))
            };

            IVsUIObject result = _imageService.GetImage(moniker, imageAttributes);

            result.get_Data(out object data);

            if (data == null)
            {
                return(null);
            }

            return(data as BitmapSource);
        }
Beispiel #26
0
        public static IVsImageService2 Create()
        {
            IVsImageService2 svc = Substitute.For <IVsImageService2>();

            IImageHandle h = ImageHandleMock.Create();

            svc.AddCustomImage(null).ReturnsForAnyArgs(h);
            svc.AddCustomImageList(null).ReturnsForAnyArgs(h);

            IVsUIObject uiObj = VsUiObjectMock.Create();

            svc.GetImage(Arg.Any <ImageMoniker>(), Arg.Any <ImageAttributes>()).ReturnsForAnyArgs(uiObj);
            svc.GetImageMonikerForFile(null).ReturnsForAnyArgs(KnownMonikers.AboutBox);
            svc.GetImageMonikerForHierarchyItem(null, 0u, 0).ReturnsForAnyArgs(KnownMonikers.AboutBox);
            svc.GetImageMonikerForName(null).ReturnsForAnyArgs(KnownMonikers.AboutBox);
            svc.GetImageMonikerType(Arg.Any <ImageMoniker>()).ReturnsForAnyArgs(0u);

            IVsImageMonikerImageList mock = VsImageMonikerImageListMock.Create();

            svc.CreateMonikerImageListFromHIMAGELIST(IntPtr.Zero).ReturnsForAnyArgs(mock);
            svc.GetImageListImageMonikers(Arg.Any <ImageMoniker>()).ReturnsForAnyArgs(mock);
            return(svc);
        }
Beispiel #27
0
        //public IVsImageService2 ImageService { get; set; }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ImageMoniker imageMoniker = new ImageMoniker {
                Guid = JFrogManifestGuid, Id = 10
            };
            IVsImageService2 imageService = (IVsImageService2)Package.GetGlobalService(typeof(SVsImageService));
            ImageAttributes  attributes   = new ImageAttributes
            {
                StructSize = Marshal.SizeOf(typeof(ImageAttributes)),
                // IT_Bitmap for Bitmap, IT_Icon for Icon
                ImageType     = (uint)_UIImageType.IT_Bitmap,
                Format        = (uint)_UIDataFormat.DF_WinForms,
                LogicalWidth  = 16,
                LogicalHeight = 16,
                // Desired RGBA color, if you don't use this, don't set IAF_Background below
                Background = 0xFFFFFFFF,
                Flags      = (uint)_ImageAttributesFlags.IAF_RequiredFlags,
            };
            IVsUIObject uIObj = imageService.GetImage(imageMoniker, attributes);

            return((BitmapImage)GelUtilities.GetObjectData(uIObj));
//            return new ImageMoniker { Guid = JFrogManifestGuid, Id = 20 };
        }
Beispiel #28
0
        public static ImageSource GetImage(this ImageMoniker imageMoniker, int size = 16)
        {
            var vsIconService = ServiceProvider.GlobalProvider.GetService(typeof(SVsImageService)) as IVsImageService2;

            ImageAttributes imageAttributes = new ImageAttributes();

            imageAttributes.Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags;
            imageAttributes.ImageType     = (uint)_UIImageType.IT_Bitmap;
            imageAttributes.Format        = (uint)_UIDataFormat.DF_WPF;
            imageAttributes.LogicalHeight = size; //IconHeight,
            imageAttributes.LogicalWidth  = size; //IconWidth,
            imageAttributes.StructSize    = Marshal.SizeOf(typeof(ImageAttributes));

            IVsUIObject result = vsIconService.GetImage(imageMoniker, imageAttributes);

            object data;

            result.get_Data(out data);
            ImageSource glyph = data as ImageSource;

            glyph.Freeze();

            return(glyph);
        }
        private static BitmapSource ToBitmap(ImageMoniker moniker, int size)
        {
            var  shell           = ServiceProvider.GlobalProvider.GetService(typeof(SVsUIShell)) as IVsUIShell5;
            uint backgroundColor = VsColors.GetThemedColorRgba(shell, EnvironmentColors.BrandedUIBackgroundBrushKey);

            var imageAttributes = new ImageAttributes
            {
                Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags | unchecked ((uint)_ImageAttributesFlags.IAF_Background),
                ImageType     = (uint)_UIImageType.IT_Bitmap,
                Format        = (uint)_UIDataFormat.DF_WPF,
                Dpi           = 96,
                LogicalHeight = size,
                LogicalWidth  = size,
                Background    = backgroundColor,
                StructSize    = Marshal.SizeOf(typeof(ImageAttributes))
            };

            var         service = (IVsImageService2)Package.GetGlobalService(typeof(SVsImageService));
            IVsUIObject result  = service.GetImage(moniker, imageAttributes);

            result.get_Data(out object data);

            return(data as BitmapSource);
        }
Beispiel #30
0
        public static BitmapSource GetImage(ImageMoniker moniker, int size)
        {
            ImageAttributes imageAttributes = new ImageAttributes();

            imageAttributes.Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags;
            imageAttributes.ImageType     = (uint)_UIImageType.IT_Bitmap;
            imageAttributes.Format        = (uint)_UIDataFormat.DF_WPF;
            imageAttributes.LogicalHeight = size;
            imageAttributes.LogicalWidth  = size;
            imageAttributes.StructSize    = Marshal.SizeOf(typeof(ImageAttributes));

            IVsUIObject result = _imageService.GetImage(moniker, imageAttributes);

            object data;

            result.get_Data(out data);

            if (data == null)
            {
                return(null);
            }

            return(data as BitmapSource);
        }
        public static BitmapSource ToBitmap(this ImageMoniker moniker, int size)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            IVsImageService2 imageService = ServiceProvider.GlobalProvider.GetService <SVsImageService, IVsImageService2>();
            Color            backColor    = VSColorTheme.GetThemedColor(EnvironmentColors.ToolWindowBackgroundColorKey);

            var imageAttributes = new ImageAttributes
            {
                Flags         = (uint)_ImageAttributesFlags.IAF_RequiredFlags | unchecked ((uint)_ImageAttributesFlags.IAF_Background),
                ImageType     = (uint)_UIImageType.IT_Bitmap,
                Format        = (uint)_UIDataFormat.DF_WPF,
                LogicalHeight = size,
                LogicalWidth  = size,
                Background    = (uint)backColor.ToArgb(),
                StructSize    = Marshal.SizeOf(typeof(ImageAttributes))
            };

            IVsUIObject result = imageService.GetImage(moniker, imageAttributes);

            result.get_Data(out var data);

            return(data as BitmapSource);
        }
Beispiel #32
0
        private static object GetObjectData(IVsUIObject obj)
        {
            Validate.IsNotNull(obj, "obj");

            object value;
            int result = obj.get_Data(out value);

            if (result != VSConstants.S_OK)
            {
                throw new COMException("Could not get object data", result);
            }

            return (value);
        }
 public int Equals(IVsUIObject pOtherObject, out bool pfAreEqual)
 {
     return instance.Value.Equals(pOtherObject, out pfAreEqual);
 }
Beispiel #34
0
 public int Equals(IVsUIObject pOtherObject, out bool pfAreEqual) {
     pfAreEqual = AreEqual(pOtherObject);
     return VSConstants.S_OK;
 }
Beispiel #35
0
 public int Equals(IVsUIObject pOtherObject, out bool pfAreEqual)
 {
     pfAreEqual = AreEqual(pOtherObject);
     return(VSConstants.S_OK);
 }
Beispiel #36
0
 public int Equals(IVsUIObject pOtherObject, out bool pfAreEqual)
 {
     return(instance.Value.Equals(pOtherObject, out pfAreEqual));
 }