Ejemplo n.º 1
0
            private bool IsOperationBoundTo(IEdmOperation operation, IEdmEntityType entityType)
            {
                if (!operation.IsBound)
                {
                    return(false);
                }

                var bindingParameterType = operation.Parameters.First().Type;

                return(entityType.Equals(
                           bindingParameterType.IsCollection()
                        ? bindingParameterType.AsCollection().ElementType().Definition
                        : bindingParameterType.Definition));
            }
Ejemplo n.º 2
0
            private bool IsOperationBoundTo(IEdmOperation operation, IEdmEntityType entityType)
            {
                if (!operation.IsBound)
                {
                    return(false);
                }

                if (!operation.Parameters.Any())
                {
                    throw new InvalidOperationException($"No parameters for bound method {operation.Name}");
                }

                var bindingParameterType = operation.Parameters.First().Type;

                return(entityType.Equals(
                           bindingParameterType.IsCollection()
                        ? bindingParameterType.AsCollection().ElementType().Definition
                        : bindingParameterType.Definition));
            }
Ejemplo n.º 3
0
            private bool IsOperationBoundTo(IEdmOperation operation, IEdmEntityType entityType)
            {
                if (!operation.IsBound)
                {
                    return false;
                }

                var bindingParameterType = operation.Parameters.First().Type;
                
                return entityType.Equals(
                    bindingParameterType.IsCollection()
                        ? bindingParameterType.AsCollection().ElementType().Definition
                        : bindingParameterType.Definition);
            }