コード例 #1
0
        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);
        }
コード例 #2
0
        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));
        }