private bool IndexValid(byte index) { foreach (var asset in EditModeUtility.FindAssetsOfType(AssetType)) { if (!(asset is CardModel model)) { return(false); } if (model.qrLink == qrLink) { continue; } if (model.index == index) { return(false); } } return(true); }
private bool IsResultatTypeDuplicate(TypeNote typeNote) => sommeil != null && EditModeUtility.FindAssetsOfType <ResultatModel>() .Where(x => x.sommeil == sommeil && x.GetInstanceID() != GetInstanceID()) .Any(x => x.noteCarnet.typeNote == typeNote);