예제 #1
0
        public IReadOnlyList <ObjectType> GetPossibleTypes(INamedType abstractType)
        {
            if (abstractType is null)
            {
                throw new ArgumentNullException(nameof(abstractType));
            }

            if (_types.TryGetPossibleTypes(abstractType.Name, out IReadOnlyList <ObjectType> types))
            {
                return(types);
            }

            return(Array.Empty <ObjectType>());
        }
예제 #2
0
        internal IReadOnlyCollection <ObjectType> GetPossibleTypes(
            INamedType abstractType)
        {
            if (abstractType == null)
            {
                throw new ArgumentNullException(nameof(abstractType));
            }

            if (_types.TryGetPossibleTypes(
                    abstractType.Name,
                    out ImmutableList <ObjectType> types))
            {
                return(types);
            }
            return(Array.Empty <ObjectType>());
        }