/* * Copyright (c) 2014-2017, Eren Okka * Copyright (c) 2016-2017, Paul Miller * Copyright (c) 2017-2018, Tyler Bratton * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ namespace AnitomySharp; /// /// An represents an identified Anime . /// A single filename may contain multiple of the same /// token(e.g ). /// public class Element { public ElementCategory Category { get; set; } public string Value { get; } /// /// Constructs a new Element /// /// the category of the element /// the element's value public Element(ElementCategory category, string value) { Category = category; Value = value; } public override int GetHashCode() { return -1926371015 + Value.GetHashCode(); } public override bool Equals(object? obj) { if (this == obj) { return true; } if (obj == null || GetType() != obj.GetType()) { return false; } var other = (Element) obj; return Category.Equals(other.Category); } public override string ToString() { return $"Element{{category={Category}, value='{Value}'}}"; } } /** Element Categories */ public enum ElementCategory { ElementAnimeSeason, ElementAnimeSeasonPrefix, ElementAnimeTitle, ElementAnimeType, ElementAnimeYear, ElementAudioTerm, ElementDeviceCompatibility, ElementEpisodeNumber, ElementEpisodeNumberAlt, ElementEpisodePrefix, ElementEpisodeTitle, ElementFileChecksum, ElementFileExtension, ElementFileName, ElementLanguage, ElementOther, ElementReleaseGroup, ElementReleaseInformation, ElementReleaseVersion, ElementSource, ElementSubtitles, ElementVideoResolution, ElementVideoTerm, ElementVolumeNumber, ElementVolumePrefix, ElementUnknown }