public string GetTypeName(TypeProxy type)
        {
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }

            var contract = GetContract(type);

            if (contract != null)
            {
                if (!String.IsNullOrEmpty(contract.Name))
                {
                    return(contract.Name);
                }
            }

            var tt = ConfigurationForType(type);

            if ((tt != null) && (tt.EffectiveSwiftName != null))
            {
                return(tt.EffectiveSwiftName);
            }

            return(TypeType.MakeSwiftSafeName(type.Name));
        }
Beispiel #2
0
        private void ReadConfigType(string typeName, TypeType configType)
        {
            if (configType.forceinclude)
            {
                if (String.IsNullOrEmpty(configType.fullname))
                {
                    ErrorHandler.Fatal(ErrorHandler.MISSING_FULL_NAME, "Included {0} '{1}' is missing the full-name attribute.", typeName, configType.name);
                }

                var type = _targetDomainProxy.GetDomainType(configType.fullname);

                ReadType(type, forceGoodType: true);
            }
        }