Example #1
0
        private static ITypeElement GetClassForMethodSearch(IType invokedObjectType, [NotNull] IParametersOwner originalMethod, [NotNull] IPsiModule psiModule)
        {
            var containingType = originalMethod.GetContainingType();

            if (containingType == null)
            {
                return(null);
            }

            if (!invokedObjectType.IsGenericIQueryable() || !IsEnumerable(containingType))
            {
                return(containingType);
            }

            var queryableName        = new ClrTypeName("System.Data.Entity.QueryableExtensions");
            var queryableType        = TypeFactory.CreateTypeByCLRName(queryableName, psiModule);
            var queryableTypeElement = queryableType.GetTypeElement();

            return(queryableTypeElement);
        }
Example #2
0
        public ITypeElement GetClassForSearch(IParametersOwner originalMethod, IType invokedType)
        {
            var containingType = originalMethod.GetContainingType();

            if (containingType == null)
            {
                return(null);
            }

            if (!invokedType.IsGenericIQueryable() || !containingType.IsEnumerableClass())
            {
                return(null);
            }

            var queryableName        = new ClrTypeName("System.Data.Entity.QueryableExtensions");
            var queryableType        = TypeFactory.CreateTypeByCLRName(queryableName, NullableAnnotation.Unknown, invokedType.Module);
            var queryableTypeElement = queryableType.GetTypeElement();

            return(queryableTypeElement);
        }
Example #3
0
 public ITypeElement GetContainingType() => Owner.GetContainingType();
Example #4
0
 public ITypeElement GetClassForSearch(IParametersOwner originalMethod, IType invokedType)
 {
     return(originalMethod.GetContainingType());
 }
Example #5
0
 public ITypeElement GetContainingType() => myParametersOwner.GetContainingType();