public override BindingInformation? ExtractBinding()

in src/BundledBindings/InputBinding.cs [17:45]


        public override BindingInformation? ExtractBinding(AttributeAst attribute, ParameterAst parameter)
        {
            BindingInformation bindingInformation = new BindingInformation();
            bindingInformation.Direction = BindingDirection;

            string bindingType = WorkerIndexingHelper.GetNamedArgumentStringValue(attribute, Constants.BindingPropertyNames.Type);
            string bindingName = WorkerIndexingHelper.GetNamedArgumentStringValue(attribute, Constants.BindingPropertyNames.Name);

            List<string> problems = new List<string>();

            if (string.IsNullOrWhiteSpace(bindingType))
            {
                problems.Add(AzPowerShellSdkStrings.MissingType);
            }
            if (string.IsNullOrWhiteSpace(bindingName))
            {
                bindingName = parameter.Name.VariablePath.UserPath;
            }

            if (problems.Count > 0)
            {
                throw new Exception(AzPowerShellSdkStrings.InputBindingProblemsExist + string.Join("\n", problems));
            }

            bindingInformation.Type = bindingType;
            bindingInformation.Name = bindingName;

            return bindingInformation;
        }