public static void AddPwgTagToList(PwgTag aPwgAlbum,
            ref PwgTagListWPF aPwgAlbumListWPF)
        {
            if (aPwgAlbum != null)
            {
                if (aPwgAlbumListWPF == null)
                {
                    aPwgAlbumListWPF = new PwgTagListWPF();
                }

                PwgTagWPF pwgTag = new PwgTagWPF();
                PwgTagWPFHelper.ConvertPwgTagToPwgTagWPF(aPwgAlbum, ref pwgTag);

                aPwgAlbumListWPF.Add(pwgTag);
            }
        }
 public static void ConvertPwgTagToPwgTagWPF(PwgTag aPwgTag,
     ref PwgTagWPF aPwgTagWPF)
 {
     if (aPwgTag != null)
     {
         if (aPwgTagWPF == null)
         {
             aPwgTagWPF = new PwgTagWPF();
         }
         aPwgTagWPF.Id = aPwgTag.Id;
         aPwgTagWPF.Name = aPwgTag.Name;
         aPwgTagWPF.Counter = aPwgTag.Counter;
         aPwgTagWPF.UrlName = aPwgTag.UrlName;
         aPwgTagWPF.UrlTag = aPwgTag.UrlTag;
     }
 }
        /// <summary>
        /// private: convert response to dto object
        /// </summary>
        /// <param name="response"></param>
        /// <param name="session"></param>
        internal static PwgTag ConvertProxyResponseToDTO(PwgTagProxyResponse response)
        {
            PwgTag returnValue = new PwgTag();

            try
            {
                returnValue.Counter = response.Counter;
                returnValue.Id = response.Id;
                returnValue.Name = response.Name;
                returnValue.UrlName = response.UrlName;

                if (String.IsNullOrEmpty(response.UrlTag))
                {
                    returnValue.UrlTag = null;
                }
                else
                {
                    returnValue.UrlTag = (new UriBuilder(response.UrlTag)).Uri;
                }
            }
            catch (Exception ex)
            {
                throw new PwgServiceException("ConvertProxyResponseToDTO : a error is raised when converting PwgTagProxyResponse.", ex);
            }

            return returnValue;
        }