mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 02:06:36 +02:00
We learned a lot about adding interfaces in WinRT this week. I figured I'd send a PR to write it all down.
31 lines
698 B
C#
31 lines
698 B
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using Windows.Storage.Streams;
|
|
|
|
namespace Microsoft.CommandPalette.Extensions.Toolkit;
|
|
|
|
public partial class IconData : IIconData
|
|
{
|
|
public IRandomAccessStreamReference? Data { get; set; }
|
|
|
|
public string? Icon { get; set; } = string.Empty;
|
|
|
|
public IconData(string? icon)
|
|
{
|
|
Icon = icon;
|
|
}
|
|
|
|
public IconData(IRandomAccessStreamReference data)
|
|
{
|
|
Data = data;
|
|
}
|
|
|
|
internal IconData()
|
|
: this(string.Empty)
|
|
{
|
|
}
|
|
}
|