public IEnumerable<Field> Build(Parameter parameter) { var arrayLength = parameter.Objects.Length; for (var index = 0; index < arrayLength; index++) { var obj = parameter.Objects[index]; if (obj is ValueType || obj is string) yield return _propertyBuilder.Build(obj, parameter.Property.Name, parameter.Parents); else { foreach (var field in _builder(obj, new[] { parameter.Property.Name, Convert.ToString(index) })) yield return field; } } }
internal IEnumerable<Field> Build(Parameter parameter) { var arrayLength = parameter.Objects.Length; for (var index = 0; index < arrayLength; index++) { var obj = parameter.Objects[index]; if (obj is ValueType) { yield return _propertyBuilder.Build(obj, "", new[] { parameter.Property.Name }); } else { parameter.InsertParents(Convert.ToString(index), parameter.Property.Name); foreach (var field in _builder(obj, parameter.Parents)) yield return field; } } }
internal QuicheBuilderException(Parameter parameter) : base(GetMessage()) { }