public Bencodex.Types.Dictionary ToBencodex() => new Bencodex.Types.Dictionary(new Dictionary <IKey, IValue> { [(Text)"used_weapons"] = new List( UsedWeapons.Select(x => (IValue)((Text)x))), [(Text)"targets"] = new List(Targets.Select(x => (IValue)((Text)x))), });
public void GetObjectData( SerializationInfo info, StreamingContext context ) { info.AddValue("used_weapons", UsedWeapons.ToArray()); info.AddValue("targets", Targets.ToArray()); }
public override int GetHashCode() { unchecked { return(((UsedWeapons?.GetHashCode() ?? 0) * 397) ^ (Targets?.GetHashCode() ?? 0)); } }
public bool Equals(BattleResult other) { return(other != null && UsedWeapons.SetEquals(other.UsedWeapons) && Targets.SetEquals(other.Targets)); }