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