Make BaseDtoType in BaseDto virtual.

This commit is contained in:
Jared Goodwin 2021-08-10 07:03:32 -07:00
parent ec2ae45e88
commit 2fbc3a12d8
22 changed files with 22 additions and 22 deletions

View File

@ -16,7 +16,7 @@ namespace Remotely.Shared.Models.RemoteControlDtos
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.AudioSample;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.AudioSample;
}
}

View File

@ -7,6 +7,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public class BaseDto
{
[DataMember(Name = "DtoType")]
public BaseDtoType DtoType { get; set; }
public virtual BaseDtoType DtoType { get; init; }
}
}

View File

@ -8,7 +8,7 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public class CaptureFrameDto : BaseDto
{
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.CaptureFrame;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.CaptureFrame;
[DataMember(Name = "EndOfFrame")]
public bool EndOfFrame { get; init; }

View File

@ -16,6 +16,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.ClipboardText;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.ClipboardText;
}
}

View File

@ -15,6 +15,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.ClipboardTransfer;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.ClipboardTransfer;
}
}

View File

@ -18,7 +18,7 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public string CssOverride { get; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.CursorChange;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.CursorChange;
[DataMember(Name = "HotSpotX")]
public int HotSpotX { get; }

View File

@ -23,6 +23,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public bool StartOfFile { get; set; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.File;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.File;
}
}

View File

@ -10,6 +10,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public string Key { get; set; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.KeyDown;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.KeyDown;
}
}

View File

@ -10,6 +10,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public string Key { get; set; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.KeyPress;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.KeyPress;
}
}

View File

@ -10,6 +10,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public string Key { get; set; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.KeyUp;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.KeyUp;
}
}

View File

@ -10,7 +10,7 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public int Button { get; set; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.MouseDown;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.MouseDown;
[DataMember(Name = "PercentX")]
public double PercentX { get; set; }

View File

@ -8,7 +8,7 @@ namespace Remotely.Shared.Models.RemoteControlDtos
{
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; set; } = BaseDtoType.MouseMove;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.MouseMove;
[DataMember(Name = "PercentX")]
public double PercentX { get; set; }

View File

@ -10,7 +10,7 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public int Button { get; set; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.MouseUp;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.MouseUp;
[DataMember(Name = "PercentX")]
public double PercentX { get; set; }

View File

@ -8,7 +8,7 @@ namespace Remotely.Shared.Models.RemoteControlDtos
{
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.MouseWheel;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.MouseWheel;
[DataMember(Name = "DeltaX")]
public double DeltaX { get; set; }

View File

@ -12,7 +12,7 @@ namespace Remotely.Shared.Models.RemoteControlDtos
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.ScreenData;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.ScreenData;
[DataMember(Name = "SelectedDisplay")]
public string SelectedDisplay { get; init; }

View File

@ -19,6 +19,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public int Height { get; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.ScreenSize;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.ScreenSize;
}
}

View File

@ -10,6 +10,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public string DisplayName { get; set; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.SelectScreen;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.SelectScreen;
}
}

View File

@ -8,7 +8,7 @@ namespace Remotely.Shared.Models.RemoteControlDtos
{
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.Tap;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.Tap;
[DataMember(Name = "PercentX")]
public double PercentX { get; set; }

View File

@ -10,6 +10,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public bool ToggleOn { get; set; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.ToggleAudio;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.ToggleAudio;
}
}

View File

@ -10,6 +10,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public bool ToggleOn { get; set; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.ToggleBlockInput;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.ToggleBlockInput;
}
}

View File

@ -10,6 +10,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
public bool ToggleOn { get; set; }
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.ToggleWebRtcVideo;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.ToggleWebRtcVideo;
}
}

View File

@ -18,6 +18,6 @@ namespace Remotely.Shared.Models.RemoteControlDtos
[DataMember(Name = "DtoType")]
public new BaseDtoType DtoType { get; } = BaseDtoType.WindowsSessions;
public override BaseDtoType DtoType { get; init; } = BaseDtoType.WindowsSessions;
}
}