private void CalculateWhereParametersGo()
        {
            _inlines       = new Dictionary <string, Parameter>();
            _topParameters = new HashSet <string>();
            foreach (var parameter in ActiveParameters.Where(p => p.Prompt))
            {
                TopParameters.Add(parameter.Name);
            }

            foreach (var field in Process.Entities.First().GetAllFields().Where(f => !f.System && f.Output))
            {
                // opt out of inline field consideration
                if (field.Parameter != null && field.Parameter.Equals("None", StringComparison.OrdinalIgnoreCase))
                {
                    continue;
                }

                if (field.Parameter != null && ParameterLookup.ContainsKey(field.Parameter) && ParameterLookup[field.Parameter].Prompt && !ParameterLookup[field.Parameter].Required)
                {
                    _inlines[field.Alias] = ParameterLookup[field.Parameter];
                    _topParameters.Remove(field.Parameter);
                }
                else if (ParameterLookup.ContainsKey(field.Alias) && ParameterLookup[field.Alias].Prompt && !ParameterLookup[field.Alias].Required)
                {
                    _inlines[field.Alias] = ParameterLookup[field.Alias];
                    _topParameters.Remove(field.Alias);
                }
                else if (ParameterLookup.ContainsKey(field.SortField) && ParameterLookup[field.SortField].Prompt && !ParameterLookup[field.SortField].Required)
                {
                    _inlines[field.Alias] = ParameterLookup[field.SortField];
                    _topParameters.Remove(field.SortField);
                }
            }
        }
Пример #2
0
 public TdlParameter GetParameter(string identifier)
 {
     if (ParameterLookup.ContainsKey(identifier))
     {
         return(ParameterLookup[identifier]);
     }
     return(null);
 }
Пример #3
0
        public void AddParameter(string identifier, TdlType type)
        {
            if (ParameterLookup.ContainsKey(identifier))
            {
                return;
            }
            TdlParameter parameter = new TdlParameter(identifier, type);

            _Parameters.Add(parameter);
            MinimumSize += parameter.Type.MinimumSize;
            ParameterLookup.Add(identifier, parameter);
            Owner.File.AddStringToHash(identifier);

            if (type.Type == ToffeeValueType.Struct)
            {
                Owner.AddRequiredNamespace(type.StructType.Namespace.FullName);
            }
        }
Пример #4
0
 public bool HasParameter(string identifier)
 {
     return(ParameterLookup.ContainsKey(identifier));
 }