You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
410 B
20 lines
410 B
using System;
|
|
|
|
[Serializable]
|
|
public abstract class KeyCompare
|
|
{
|
|
public abstract bool Match(object obj);
|
|
}
|
|
|
|
[Serializable]
|
|
public class DefaultKey : KeyCompare
|
|
{
|
|
public override bool Match(object obj) => true;
|
|
}
|
|
|
|
[Serializable]
|
|
public class MatePropertyKey : KeyCompare
|
|
{
|
|
public MateProperty target;
|
|
public override bool Match(object obj) => obj is MateProperty mate && mate.id == target.id;
|
|
}
|