public override BindingInformation? ExtractBinding()

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


        public override BindingInformation? ExtractBinding(AttributeAst attribute)
        {
            BindingInformation bindingInformation = new BindingInformation();
            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))
            {
                problems.Add(AzPowerShellSdkStrings.MissingBindingName);
            }

            bindingInformation.Direction = BindingDirection;

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

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

            return bindingInformation;
        }