Example #1
0
        public override string Convert(IReturnType returnType)
        {
            if (returnType == null)
            {
                return(String.Empty);
            }
            StringBuilder builder = new StringBuilder();

            string fullName = returnType.FullyQualifiedName;
            string shortName;

            if (fullName != null && TypeConversionTable.TryGetValue(fullName, out shortName))
            {
                builder.Append(shortName);
            }
            else
            {
                if (UseFullyQualifiedNames)
                {
                    builder.Append(fullName);
                }
                else
                {
                    builder.Append(returnType.Name);
                }
            }

            UnpackNestedType(builder, returnType);

            return(builder.ToString());
        }
Example #2
0
        public override string GetIntrinsicTypeName(string dotNetTypeName)
        {
            string shortName;

            if (TypeConversionTable.TryGetValue(dotNetTypeName, out shortName))
            {
                return(shortName);
            }
            return(dotNetTypeName);
        }