예제 #1
0
        public static int[] GetGroupAffinities(this IGroupSystem groupSystem)
        {
            var affinity = groupSystem.GetType()
                           .GetCustomAttributes(typeof(CollectionAffinityAttribute), true)
                           .FirstOrDefault();

            return(((CollectionAffinityAttribute)affinity)?.CollectionIds);
        }
예제 #2
0
        public static int[] GetGroupAffinities(this IGroupSystem system)
        {
            if (system is null)
            {
                throw new ArgumentNullException(nameof(system));
            }

            var affinity = system.GetType().GetCustomAttribute(typeof(CollectionAffinityAttribute), true);

            return(((CollectionAffinityAttribute)affinity)?.CollectionIds);
        }