public override string GenerateDescription(NktParam aParameter, string functionName) { var nonStructureFields = NonStructureFieldsFrom(aParameter); if (nonStructureFields.Length == 0) return EmptyStructureDescription; var stringDescriptor = new StringDescriptor(); if (!nonStructureFields.Any(parameter => stringDescriptor.CanHandle(parameter, functionName))) return FormatAsStructure(Describe(nonStructureFields.First(), functionName)); var aField = nonStructureFields.First(aParameter1 => stringDescriptor.CanHandle(aParameter1, functionName)); var fieldDescription = stringDescriptor.GenerateDescription(aField, functionName); return FormatAsStructure(fieldDescription); }
public override string GenerateDescription(NktParam aParameter, string functionName) { var nonStructureFields = NonStructureFieldsFrom(aParameter); if (nonStructureFields.Length == 0) { return(EmptyStructureDescription); } var stringDescriptor = new StringDescriptor(); if (!nonStructureFields.Any(parameter => stringDescriptor.CanHandle(parameter, functionName))) { return(FormatAsStructure(Describe(nonStructureFields.First(), functionName))); } var aField = nonStructureFields.First(aParameter1 => stringDescriptor.CanHandle(aParameter1, functionName)); var fieldDescription = stringDescriptor.GenerateDescription(aField, functionName); return(FormatAsStructure(fieldDescription)); }