Exemplo n.º 1
0
        /// <summary>
        /// Returns the input string representation
        /// </summary>
        /// <returns>string representation</returns>
        public string GetInputString()
        {
            var arrayDescription = ToArray();

            return(IODefinition.GetDescription(arrayDescription[(int)KeyDefinitionIndices.Flags],
                                               arrayDescription[(int)KeyDefinitionIndices.Value]));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns the output string representation
        /// </summary>
        /// <returns>string representation</returns>
        public string GetOutputString()
        {
            var arrayDescription = ToArray();
            var zBuilder         = new StringBuilder();
            var nIdx             = (int)KeyDefinitionIndices.Count + 1; // start with the first output key definition

            while (nIdx < arrayDescription.Length)
            {
                zBuilder.Append(IODefinition.GetDescription(arrayDescription[(int)KeyDefinitionIndices.Flags + nIdx],
                                                            arrayDescription[(int)KeyDefinitionIndices.Value + nIdx]));
                if ((nIdx + (int)KeyDefinitionIndices.Count) < arrayDescription.Length)
                {
                    zBuilder.Append("+");
                }
                nIdx += (int)KeyDefinitionIndices.Count;
            }
            return(zBuilder.ToString());
        }