public static registeredInfo MapRegisteredInfo(uddi.apiv2.registeredInfo registeredInfo)
        {
            if (registeredInfo == null)
            {
                return(null);
            }
            registeredInfo r = new registeredInfo();

            r.businessInfos      = MapBusinessInfo(registeredInfo.businessInfos);
            r.truncated          = registeredInfo.truncated == uddi.apiv2.truncated.@true;
            r.truncatedSpecified = registeredInfo.truncatedSpecified;

            List <tModelInfo> x = new List <tModelInfo>();

            if (registeredInfo.tModelInfos != null)
            {
                for (int i = 0; i < registeredInfo.tModelInfos.Length; i++)
                {
                    tModelInfo t = new tModelInfo();
                    t.tModelKey = registeredInfo.tModelInfos[i].tModelKey;
                    if (registeredInfo.tModelInfos[i].name != null)
                    {
                        t.name = new name(
                            registeredInfo.tModelInfos[i].name.Value, registeredInfo.tModelInfos[i].name.lang);
                    }
                    x.Add(t);
                }
            }
            r.tModelInfos = x.ToArray();
            return(r);
        }
        public static uddi.apiv3.tModelList MapTModelList(uddi.apiv2.tModelList tModelList)
        {
            if (tModelList == null)
            {
                return(null);
            }
            uddi.apiv3.tModelList r = new tModelList();
            List <tModelInfo>     x = new List <tModelInfo>();

            if (tModelList.tModelInfos != null)
            {
                for (int i = 0; i < tModelList.tModelInfos.Length; i++)
                {
                    tModelInfo s = new tModelInfo();
                    s.tModelKey = tModelList.tModelInfos[i].tModelKey;
                    if (tModelList.tModelInfos[i].name != null)
                    {
                        s.name = new name(tModelList.tModelInfos[i].name.Value, tModelList.tModelInfos[i].name.lang);
                    }
                    x.Add(s);
                }
            }
            r.tModelInfos                  = x.ToArray();
            r.listDescription              = new listDescription();
            r.listDescription.actualCount  = r.tModelInfos.Length;
            r.listDescription.includeCount = r.tModelInfos.Length;
            r.truncated          = tModelList.truncated == uddi.apiv2.truncated.@true;
            r.truncatedSpecified = tModelList.truncatedSpecified;
            return(r);
        }