BExIS.IO.Transform.Input.DataReader.ValidateComparisonWithDatatsructure C# (CSharp) Метод

ValidateComparisonWithDatatsructure() публичный Метод

Compare Datastructure with Submited Variables And create a Dictionary of ValueValidationmanagers
public ValidateComparisonWithDatatsructure ( List variableIdentifers ) : List
variableIdentifers List
Результат List
        public List<Error> ValidateComparisonWithDatatsructure(List<VariableIdentifier> variableIdentifers)
        {
            List<Error> errors = new List<Error>();

            try
            {

                List<VariableIdentifier> source = getDatastructureVariableIdentifiers();

                DatastructureMatchCheck dmc = new DatastructureMatchCheck();
                errors = dmc.Execute(SubmitedVariableIdentifiers, source, this.StructuredDataStructure.Name);
            }
            catch {

            }
            if (errors == null)
            {

                for (int i = 0; i < variableIdentifers.Count; i++)
                {
                    VariableIdentifier hv = variableIdentifers.ElementAt(i);

                    if (hv != null)
                    {
                        Variable sdvu = getVariableUsage(hv);

                        if (sdvu != null)
                        {
                            string varName = sdvu.Label;
                            bool optional = sdvu.IsValueOptional;
                            string dataType = sdvu.DataAttribute.DataType.SystemType;

                            // change parameters to only sdvu
                            this.ValueValidationManagerDic.Add(sdvu.Id, createValueValidationManager(varName, dataType, optional, sdvu.DataAttribute));
                        }
                        else
                        {
                            errors.Add(new Error(ErrorType.Datastructure, "Error with name of Variable"));
                        }
                    }
                }//for
            }
            else
            {
                if (errors.Count > 0) return errors;
                else return null;
            }

            return null;
        }