string SelectUnion(RawAccount account) { var union = new StringBuilder(); if (account.DelegationsCount > 0) { UnionDelegations(union); } if (account.OriginationsCount > 0) { UnionOriginations(union); } if (account.TransactionsCount > 0) { UnionTransactions(union); } if (account.RevealsCount > 0) { UnionReveals(union); } if (account.MigrationsCount > 0) { UnionMigrations(union); } if (account is RawUser user) { if (user.Activated == true) { UnionActivations(union); } } if (account is RawDelegate delegat) { if (delegat.BlocksCount > 0) { UnionBaking(union); } if (delegat.EndorsementsCount > 0) { UnionEndorsements(union); } if (delegat.DoubleBakingCount > 0) { UnionDoubleBaking(union); } if (delegat.DoubleEndorsingCount > 0) { UnionDoubleEndorsing(union); } if (delegat.NonceRevelationsCount > 0) { UnionNonceRevelations(union); } if (delegat.RevelationPenaltiesCount > 0) { UnionRevelationPenalties(union); } } return(union.ToString()); }
string SumUnion(RawAccount account, int from, int to) { var union = new StringBuilder(); if (account.DelegationsCount > 0) { SumDelegations(union, from, to); } if (account.OriginationsCount > 0) { SumOriginations(union, from, to); } if (account.TransactionsCount > 0) { SumTransactions(union, from, to); } if (account.RevealsCount > 0) { SumReveals(union, from, to); } if (account.MigrationsCount > 0) { SumMigrations(union, from, to); } if (account is RawUser user) { if (user.Activated == true) { SumActivations(union, from, to); } } if (account is RawDelegate delegat) { if (delegat.BlocksCount > 0) { SumBaking(union, from, to); } if (delegat.EndorsementsCount > 0) { SumEndorsements(union, from, to); } if (delegat.DoubleBakingCount > 0) { SumDoubleBaking(union, from, to); } if (delegat.DoubleEndorsingCount > 0) { SumDoubleEndorsing(union, from, to); } if (delegat.NonceRevelationsCount > 0) { SumNonceRevelations(union, from, to); } if (delegat.RevelationPenaltiesCount > 0) { SumRevelationPenalties(union, from, to); } } return(union.ToString()); }