mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
- Move all source files from Core.ViewModels to UI.ViewModels - Update namespace from Microsoft.CmdPal.Core.ViewModels to Microsoft.CmdPal.UI.ViewModels - Remove Core.ViewModels project from solution files - Update all using statements in dependent projects - Delete the Core folder which is now empty
33 lines
860 B
C#
33 lines
860 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 Microsoft.CmdPal.UI.ViewModels.Models;
|
|
using Microsoft.CommandPalette.Extensions;
|
|
|
|
namespace Microsoft.CmdPal.UI.ViewModels;
|
|
|
|
public partial class LogMessageViewModel : ExtensionObjectViewModel
|
|
{
|
|
private readonly ExtensionObject<ILogMessage> _model;
|
|
|
|
public string Message { get; private set; } = string.Empty;
|
|
|
|
public LogMessageViewModel(ILogMessage message, IPageContext context)
|
|
: base(context)
|
|
{
|
|
_model = new(message);
|
|
}
|
|
|
|
public override void InitializeProperties()
|
|
{
|
|
var model = _model.Unsafe;
|
|
if (model is null)
|
|
{
|
|
return; // throw?
|
|
}
|
|
|
|
Message = model.Message;
|
|
}
|
|
}
|