Remove C# 7 pattern match
This commit is contained in:
parent
99b229ebed
commit
730b254f6e
|
@ -36,8 +36,10 @@ namespace Ooui
|
||||||
{
|
{
|
||||||
if (message.TargetId == Id) {
|
if (message.TargetId == Id) {
|
||||||
switch (message.MessageType) {
|
switch (message.MessageType) {
|
||||||
case MessageType.Call when message.Key == "getContext" && message.Value is Array a && a.Length == 1 && "2d".Equals (a.GetValue (0)):
|
case MessageType.Call:
|
||||||
AddStateMessage (message);
|
if (message.Key == "getContext" && message.Value is Array a && a.Length == 1 && "2d".Equals (a.GetValue (0))) {
|
||||||
|
AddStateMessage (message);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,6 +124,7 @@ namespace Ooui
|
||||||
protected override bool SaveStateMessageIfNeeded (Message message)
|
protected override bool SaveStateMessageIfNeeded (Message message)
|
||||||
{
|
{
|
||||||
if (message.TargetId == Id) {
|
if (message.TargetId == Id) {
|
||||||
|
var handled = false;
|
||||||
switch (message.MessageType) {
|
switch (message.MessageType) {
|
||||||
case MessageType.Call when message.Key == "insertBefore":
|
case MessageType.Call when message.Key == "insertBefore":
|
||||||
AddStateMessage (message);
|
AddStateMessage (message);
|
||||||
|
@ -150,9 +151,9 @@ namespace Ooui
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
}
|
||||||
base.SaveStateMessageIfNeeded (message);
|
if (!handled) {
|
||||||
break;
|
base.SaveStateMessageIfNeeded (message);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue