Welcome to mirror list, hosted at ThFree Co, Russian Federation.

IImageService.cs « Def « Imaging « Editor « src - github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cecb445e18c17261b34c540b0842231fff557a40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
//  Copyright (c) Microsoft Corporation. All rights reserved.
//  Licensed under the MIT License. See License.txt in the project root for license information.
//

namespace Microsoft.VisualStudio.Core.Imaging
{
    public interface IImageService
    {
        object GetImage(ImageDescription description);
    }

    public static class ImageServiceExtensions
    {
        public static object GetImage(
            this IImageService imageService,
            ImageId id,
            ImageTags tags = ImageTags.None)
            => imageService.GetImage(new ImageDescription(id, tags));

        public static object GetImage(
            this IImageService imageService,
            ImageId id,
            int size,
            ImageTags tags = ImageTags.None)
            => imageService.GetImage(new ImageDescription(id, size, tags));
    }
}