public Optional getDataByName()

in src/main/java/com/microsoft/azure/functions/worker/binding/BindingDataStore.java [54:67]


    public Optional<BindingData> getDataByName(String name, Type target) {
        DataSource<?> parameterDataSource = this.inputSources.get(name);
        if (parameterDataSource == null) {
            Optional<Map.Entry<String, DataSource<?>>> firstEntry = this.inputSources.entrySet().stream().findFirst();
            if (firstEntry.isPresent()) {
                DataSource<?> subDict = firstEntry.get().getValue();
                return subDict.computeByName(name, target);
            }
        }
        if (parameterDataSource == null) {
            throw new RuntimeException("Cannot find matched parameter name of customer function, please check if customer function is defined correctly");
        }
    	return parameterDataSource.computeByName(name, target);
    }