Index: /extensions/PiwigoLib/Piwigo.sln
===================================================================
--- /extensions/PiwigoLib/Piwigo.sln	(revision 7148)
+++ /extensions/PiwigoLib/Piwigo.sln	(revision 7149)
@@ -1,23 +1,51 @@
 ﻿
 Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C# Express 2010
+# Visual Studio 2010
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PiwigoLib", "PiwigoLib\PiwigoLib.csproj", "{64C068C5-DBFE-4712-9081-B9100698F35C}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestPiwigoLib", "TestPiwigoLib\TestPiwigoLib.csproj", "{9B390DE8-884A-433D-828A-C7B969F19924}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PiwigoWpf", "PiwigoWpf\PiwigoWpf.csproj", "{59F7FCF2-858A-406D-92A6-50514BD89B43}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
+		Debug|Mixed Platforms = Debug|Mixed Platforms
+		Debug|x86 = Debug|x86
 		Release|Any CPU = Release|Any CPU
+		Release|Mixed Platforms = Release|Mixed Platforms
+		Release|x86 = Release|x86
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{64C068C5-DBFE-4712-9081-B9100698F35C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{64C068C5-DBFE-4712-9081-B9100698F35C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{64C068C5-DBFE-4712-9081-B9100698F35C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{64C068C5-DBFE-4712-9081-B9100698F35C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{64C068C5-DBFE-4712-9081-B9100698F35C}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{64C068C5-DBFE-4712-9081-B9100698F35C}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{64C068C5-DBFE-4712-9081-B9100698F35C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{64C068C5-DBFE-4712-9081-B9100698F35C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{64C068C5-DBFE-4712-9081-B9100698F35C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{64C068C5-DBFE-4712-9081-B9100698F35C}.Release|x86.ActiveCfg = Release|Any CPU
 		{9B390DE8-884A-433D-828A-C7B969F19924}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{9B390DE8-884A-433D-828A-C7B969F19924}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9B390DE8-884A-433D-828A-C7B969F19924}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{9B390DE8-884A-433D-828A-C7B969F19924}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{9B390DE8-884A-433D-828A-C7B969F19924}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{9B390DE8-884A-433D-828A-C7B969F19924}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{9B390DE8-884A-433D-828A-C7B969F19924}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9B390DE8-884A-433D-828A-C7B969F19924}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{9B390DE8-884A-433D-828A-C7B969F19924}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{9B390DE8-884A-433D-828A-C7B969F19924}.Release|x86.ActiveCfg = Release|Any CPU
+		{59F7FCF2-858A-406D-92A6-50514BD89B43}.Debug|Any CPU.ActiveCfg = Debug|x86
+		{59F7FCF2-858A-406D-92A6-50514BD89B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{59F7FCF2-858A-406D-92A6-50514BD89B43}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{59F7FCF2-858A-406D-92A6-50514BD89B43}.Debug|x86.ActiveCfg = Debug|x86
+		{59F7FCF2-858A-406D-92A6-50514BD89B43}.Debug|x86.Build.0 = Debug|x86
+		{59F7FCF2-858A-406D-92A6-50514BD89B43}.Release|Any CPU.ActiveCfg = Release|x86
+		{59F7FCF2-858A-406D-92A6-50514BD89B43}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{59F7FCF2-858A-406D-92A6-50514BD89B43}.Release|Mixed Platforms.Build.0 = Release|x86
+		{59F7FCF2-858A-406D-92A6-50514BD89B43}.Release|x86.ActiveCfg = Release|x86
+		{59F7FCF2-858A-406D-92A6-50514BD89B43}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /extensions/PiwigoLib/PiwigoLib/DTO/Helper/PwgEnumHelper.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/DTO/Helper/PwgEnumHelper.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/DTO/Helper/PwgEnumHelper.cs	(revision 7149)
@@ -9,7 +9,7 @@
 namespace Com.Piwigo.Lib.DTO.Helper
 {
-    public static class PwgEnumHelper<T>
+    internal static class PwgEnumHelper<T>
     {
-        public static string stringValueOf(T value)
+        internal static string stringValueOf(T value)
         {
             FieldInfo fi = value.GetType().GetField(value.ToString());
@@ -25,5 +25,5 @@
         }
 
-        public static T enumValueOf(string value)
+        internal static T enumValueOf(string value)
         {
             Type enumType = typeof(T);
Index: /extensions/PiwigoLib/PiwigoLib/PiwigoLib.csproj
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/PiwigoLib.csproj	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/PiwigoLib.csproj	(revision 7149)
@@ -73,8 +73,15 @@
     <Compile Include="Proxy\PwgProxyException.cs" />
     <Compile Include="Proxy\PwgSessionProxy.cs" />
+    <Compile Include="IService\IPwgCategoriesService.cs" />
+    <Compile Include="IService\IPwgImagesService.cs" />
+    <Compile Include="IService\IPwgSessionService.cs" />
+    <Compile Include="IService\IPwgSetupService.cs" />
+    <Compile Include="IService\IPwgTagsService.cs" />
+    <Compile Include="Service\PwgSetupService.cs" />
+    <Compile Include="IService\PwgServiceProvider.cs" />
     <Compile Include="Service\PwgCategoriesService.cs" />
     <Compile Include="Service\PwgImagesService.cs" />
     <Compile Include="Service\PwgTagsService.cs" />
-    <Compile Include="Service\PwgServiceException.cs" />
+    <Compile Include="DTO\PwgServiceException.cs" />
     <Compile Include="Service\PwgSessionService.cs" />
   </ItemGroup>
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Helper/PwgProxyReponseHelper.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Helper/PwgProxyReponseHelper.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Helper/PwgProxyReponseHelper.cs	(revision 7149)
@@ -7,7 +7,7 @@
 namespace Com.Piwigo.Lib.Proxy.Helper
 {
-    public static class PwgProxyReponseHelper
+    internal static class PwgProxyReponseHelper
     {
-        public static void buildQueryFromArray<T>(List<T> values, String paramName, ref Boolean firstOcc, StringBuilder queryStringBuilder)
+        internal static void buildQueryFromArray<T>(List<T> values, String paramName, ref Boolean firstOcc, StringBuilder queryStringBuilder)
         {
             String FormatString = String.Empty;
@@ -36,5 +36,5 @@
         }
 
-        public static void buildQueryFromValue<T>(Nullable<T> nullableValue, String paramName, ref Boolean firstOcc, StringBuilder queryStringBuilder)
+        internal static void buildQueryFromValue<T>(Nullable<T> nullableValue, String paramName, ref Boolean firstOcc, StringBuilder queryStringBuilder)
             where T: struct 
         {
@@ -45,5 +45,5 @@
         }
 
-        public static void buildQueryFromValue<T>(T value, String paramName, ref Boolean firstOcc, StringBuilder queryStringBuilder)
+        internal static void buildQueryFromValue<T>(T value, String paramName, ref Boolean firstOcc, StringBuilder queryStringBuilder)
         {
             String FormatString = String.Empty;
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/PwgCategoriesProxy.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/PwgCategoriesProxy.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/PwgCategoriesProxy.cs	(revision 7149)
@@ -10,5 +10,5 @@
 namespace Com.Piwigo.Lib.Proxy
 {
-    static class PwgCategoriesProxy
+    static internal class PwgCategoriesProxy
     {
         /// <summary>
@@ -19,5 +19,5 @@
         /// <param name="PublicOnly"></param>
         /// <returns></returns>
-        static public PwgCategoriesProxyResponse pwg_categories_getList(Int32? CategoryId, 
+        static internal PwgCategoriesProxyResponse pwg_categories_getList(Int32? CategoryId, 
             Boolean? Recursive, Boolean? PublicOnly)
         {
@@ -33,5 +33,5 @@
 
                 response = PwgGenericProxy<PwgCategoriesProxyResponse>.Get(
-                                PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                                PwgConfigProxy.PwgServeurUri,
                                 "pwg.categories.getList", data.ToString());
             }
@@ -48,5 +48,5 @@
         /// </summary>
         /// <returns></returns>
-        static public PwgCategoriesProxyResponse pwg_categories_getAdminList()
+        static internal PwgCategoriesProxyResponse pwg_categories_getAdminList()
         {
             PwgCategoriesProxyResponse response = null;
@@ -54,5 +54,5 @@
             {
                 response = PwgGenericProxy<PwgCategoriesProxyResponse>.Get(
-                                PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                                PwgConfigProxy.PwgServeurUri,
                                 "pwg.categories.getAdminList", null);
             }
@@ -71,5 +71,5 @@
         /// <param name="IdUpperCat"></param>
         /// <returns></returns>
-        static public PwgAddRequestProxyResponse pwg_categories_add(String categorieName, Int32? IdUpperCat)
+        static internal PwgAddRequestProxyResponse pwg_categories_add(String categorieName, Int32? IdUpperCat)
         {
             PwgAddRequestProxyResponse response = null;
@@ -83,5 +83,5 @@
 
                 response = PwgGenericProxy<PwgAddRequestProxyResponse>.Post(
-                    PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                    PwgConfigProxy.PwgServeurUri,
                     data.ToString());
             }
@@ -101,5 +101,5 @@
         /// <param name="categorieComment"></param>
         /// <returns></returns>
-        static public PwgBaseProxyReponse pwg_categories_setInfo(Int32 IdCat, String categorieName, String categorieComment)
+        static internal PwgBaseProxyReponse pwg_categories_setInfo(Int32 IdCat, String categorieName, String categorieComment)
         {
             PwgBaseProxyReponse response = null;
@@ -114,5 +114,5 @@
 
                 response = PwgGenericProxy<PwgAddRequestProxyResponse>.Post(
-                    PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                    PwgConfigProxy.PwgServeurUri,
                     data.ToString());
             }
@@ -145,5 +145,5 @@
         /// <param name="withThumbnail"></param>
         /// <returns></returns>
-        static public PwgImagesProxyResponse pwg_categories_getImages(Int32 catId,
+        static internal PwgImagesProxyResponse pwg_categories_getImages(Int32 catId,
                                                             Boolean? recursive,
                                                             Int32? perPage,
@@ -188,5 +188,5 @@
 
                 response = PwgGenericProxy<PwgImagesProxyResponse>.Post(
-                                PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                                PwgConfigProxy.PwgServeurUri,
                                 data.ToString());
             }
@@ -204,5 +204,5 @@
         /// <param name="tagName"></param>
         /// <returns></returns>
-        static public PwgAddRequestProxyResponse pwg_tag_add(string tagName)
+        static internal PwgAddRequestProxyResponse pwg_tag_add(string tagName)
         {
             PwgAddRequestProxyResponse response = null;
@@ -214,5 +214,5 @@
 
                 response = PwgGenericProxy<PwgAddRequestProxyResponse>.Post(
-                    PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                    PwgConfigProxy.PwgServeurUri,
                     data.ToString());
             }
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/PwgConfigProxy.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/PwgConfigProxy.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/PwgConfigProxy.cs	(revision 7149)
@@ -7,13 +7,13 @@
 namespace Com.Piwigo.Lib.Proxy
 {
-    public static class PwgConfigProxy
+    internal static class PwgConfigProxy
     {
-        public static String PwgUserAgent = "PiwigoLib.GenericProxy";
-        public static Boolean PwgKeepAlive = false;
-        public static Int16 PwgTimeOutInSecond = 15;
+        internal static String PwgUserAgent = "PiwigoLib.GenericProxy";
+        internal static Boolean PwgKeepAlive = false;
+        internal static Int16 PwgTimeOutInSecond = 15;
 
-        public static UriBuilder PwgServeurUriBuilder = new UriBuilder(); // store uri piece of the server
+        internal static Uri PwgServeurUri = null; // store uri piece of the server
 
-        public static CookieContainer cookieContainer = new CookieContainer(); // store cookie as session once
+        internal static CookieContainer cookieContainer = new CookieContainer(); // store cookie as session once
 
     }
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/PwgGenericProxy.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/PwgGenericProxy.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/PwgGenericProxy.cs	(revision 7149)
@@ -12,8 +12,8 @@
 {
 
-    static public class PwgGenericProxy<T>
+    static internal class PwgGenericProxy<T>
     {
-        
-        public static T Get(Uri address, String methodName, String methodParameter)
+
+        internal static T Get(Uri address, String methodName, String methodParameter)
         {
             T ReturnValue = default(T);
@@ -77,5 +77,5 @@
         }
 
-        public static T Post(Uri address, String data)
+        internal static T Post(Uri address, String data)
         {
             T ReturnValue = default(T);
@@ -144,5 +144,5 @@
         }
 
-        public static T DeserializeObject(StreamReader xmlData)
+        internal static T DeserializeObject(StreamReader xmlData)
         {
             T ReturnValue = default(T);
@@ -167,5 +167,5 @@
         }
 
-        public static void SerializeToXML(String fileName,T obj  )
+        internal static void SerializeToXML(String fileName, T obj)
         {
             try
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/PwgImagesProxy.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/PwgImagesProxy.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/PwgImagesProxy.cs	(revision 7149)
@@ -10,5 +10,5 @@
 namespace Com.Piwigo.Lib.Proxy
 {
-    static class PwgImagesProxy
+    static internal class PwgImagesProxy
     {
         /// <summary>
@@ -18,5 +18,5 @@
         /// <param name="imageRate"></param>
         /// <returns></returns>
-        static public PwgImageRateProxyResponse pwg_images_rate(Int32 imageId, Int32 imageRate)
+        static internal PwgImageRateProxyResponse pwg_images_rate(Int32 imageId, Int32 imageRate)
         {
             PwgImageRateProxyResponse response = null;
@@ -30,5 +30,5 @@
 
                 response = PwgGenericProxy<PwgImageRateProxyResponse>.Post(
-                    PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                    PwgConfigProxy.PwgServeurUri,
                     data.ToString());
             }
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/PwgProxyException.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/PwgProxyException.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/PwgProxyException.cs	(revision 7149)
@@ -6,18 +6,18 @@
 namespace Com.Piwigo.Lib.Proxy
 {
-    public sealed class PwgProxyException : ApplicationException 
+    internal sealed class PwgProxyException : ApplicationException 
     {
         private static String Defaut_Message = "A PwgProxyException occurs...";
-        public PwgProxyException() 
+        internal PwgProxyException() 
             : base(Defaut_Message)
         {
         }
 
-        public PwgProxyException(String message)
+        internal PwgProxyException(String message)
             : base(Defaut_Message + " " + message)
         {
         }
 
-        public PwgProxyException(String message, Exception innerEx)
+        internal PwgProxyException(String message, Exception innerEx)
             : base(Defaut_Message + " " + message, innerEx)
         {
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/PwgSessionProxy.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/PwgSessionProxy.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/PwgSessionProxy.cs	(revision 7149)
@@ -9,7 +9,7 @@
 namespace Com.Piwigo.Lib.Proxy
 {
-    static class PwgSessionProxy
+    static internal class PwgSessionProxy
     {
-        static public PwgSessionProxyResponse pwg_session_getStatus()
+        static internal PwgSessionProxyResponse pwg_session_getStatus()
         {
             PwgSessionProxyResponse response = null;
@@ -17,5 +17,5 @@
             {            
             response = PwgGenericProxy<PwgSessionProxyResponse>.Get(
-                                PwgConfigProxy.PwgServeurUriBuilder.Uri, 
+                                PwgConfigProxy.PwgServeurUri, 
                                 "pwg.session.getStatus", null);
             }
@@ -28,5 +28,5 @@
         }
 
-        static public PwgSessionProxyResponse pwg_session_login(string UserName, string Password)
+        static internal PwgSessionProxyResponse pwg_session_login(string UserName, string Password)
         {
             PwgSessionProxyResponse response = null;
@@ -40,5 +40,5 @@
 
                 response = PwgGenericProxy<PwgSessionProxyResponse>.Post(
-                    PwgConfigProxy.PwgServeurUriBuilder.Uri, 
+                    PwgConfigProxy.PwgServeurUri, 
                     data.ToString());
             }
@@ -51,5 +51,5 @@
         }
 
-        static public PwgSessionProxyResponse pwg_session_logout()
+        static internal PwgSessionProxyResponse pwg_session_logout()
         {
             PwgSessionProxyResponse response = null;
@@ -60,5 +60,5 @@
 
                 response = PwgGenericProxy<PwgSessionProxyResponse>.Post(
-                    PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                    PwgConfigProxy.PwgServeurUri,
                     data.ToString());
             }
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/PwgTagsProxy.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/PwgTagsProxy.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/PwgTagsProxy.cs	(revision 7149)
@@ -10,7 +10,7 @@
 namespace Com.Piwigo.Lib.Proxy
 {
-    static class PwgTagsProxy
+    static internal class PwgTagsProxy
     {
-        static public PwgTagsProxyResponse pwg_tags_getList(Boolean? sortedByCounter)
+        static internal PwgTagsProxyResponse pwg_tags_getList(Boolean? sortedByCounter)
         {
             PwgTagsProxyResponse response = null;
@@ -23,5 +23,5 @@
 
                 response = PwgGenericProxy<PwgTagsProxyResponse>.Get(
-                                PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                                PwgConfigProxy.PwgServeurUri,
                                 "pwg.tags.getList", data.ToString());
             }
@@ -34,5 +34,5 @@
         }
 
-        static public PwgTagsProxyResponse pwg_tags_getAdminList()
+        static internal PwgTagsProxyResponse pwg_tags_getAdminList()
         {
             PwgTagsProxyResponse response = null;
@@ -40,5 +40,5 @@
             {
                 response = PwgGenericProxy<PwgTagsProxyResponse>.Get(
-                                PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                                PwgConfigProxy.PwgServeurUri,
                                 "pwg.tags.getAdminList", null);
             }
@@ -51,5 +51,5 @@
         }
 
-        static public PwgImagesProxyResponse pwg_tags_getImages(List<Int32> tagsId,		
+        static internal PwgImagesProxyResponse pwg_tags_getImages(List<Int32> tagsId,		
                                                                     List<String>    tagsUrlName,
                                                                     List<String>    tagsName,
@@ -98,5 +98,5 @@
 
                 response = PwgGenericProxy<PwgImagesProxyResponse>.Post(
-                                PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                                PwgConfigProxy.PwgServeurUri,
                                 data.ToString());
             }
@@ -108,5 +108,5 @@
 
         }
-        static public PwgAddRequestProxyResponse pwg_tag_add(string tagName)
+        static internal PwgAddRequestProxyResponse pwg_tag_add(string tagName)
         {
             PwgAddRequestProxyResponse response = null;
@@ -118,5 +118,5 @@
 
                 response = PwgGenericProxy<PwgAddRequestProxyResponse>.Post(
-                    PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                    PwgConfigProxy.PwgServeurUri,
                     data.ToString());
             }
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgAddRequestProxyResponse.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgAddRequestProxyResponse.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgAddRequestProxyResponse.cs	(revision 7149)
@@ -10,10 +10,10 @@
     [Serializable()]
     [XmlRoot(ElementName = "rsp")]
-    public class PwgAddRequestProxyResponse : PwgBaseProxyReponse
+    internal class PwgAddRequestProxyResponse : PwgBaseProxyReponse
     {
         [XmlElement(ElementName="info")]
-        public String Message { get; set; }
+        internal String Message { get; set; }
         [XmlElement(ElementName = "id")]
-        public Int32 NewId { get; set; }
+        internal Int32 NewId { get; set; }
 
     }
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgBaseProxyReponse.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgBaseProxyReponse.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgBaseProxyReponse.cs	(revision 7149)
@@ -10,11 +10,11 @@
     [Serializable()]
     [XmlRoot(ElementName = "err")]
-    public class PwgBaseProxyReponseError
+    internal class PwgBaseProxyReponseError
     {
         [XmlAttribute(AttributeName = "code")]
-        public Int32 Code { get; set; }
+        internal Int32 Code { get; set; }
 
         [XmlAttribute(AttributeName = "msg")]
-        public String Message { get; set; }
+        internal String Message { get; set; }
     }
 
@@ -22,11 +22,11 @@
     [Serializable()]
     [XmlRoot(ElementName = "rsp")]
-    public abstract class PwgBaseProxyReponse
+    internal abstract class PwgBaseProxyReponse
     {
         [XmlAttribute(AttributeName="stat")]
-        public PwgBaseProxyReponseRetourEnum Retour { get; set; }
+        internal PwgBaseProxyReponseRetourEnum Retour { get; set; }
 
         [XmlElement(ElementName="err")]
-        public PwgBaseProxyReponseError Erreur { get; set; }
+        internal PwgBaseProxyReponseError Erreur { get; set; }
 
     }
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgBaseProxyReponseRetourEnum.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgBaseProxyReponseRetourEnum.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgBaseProxyReponseRetourEnum.cs	(revision 7149)
@@ -9,5 +9,5 @@
     [Serializable()]
     [XmlRoot(ElementName = "PwgBaseProxyReponseRetourEnum")]
-    public enum PwgBaseProxyReponseRetourEnum : int
+    internal enum PwgBaseProxyReponseRetourEnum : int
     {
         [XmlEnum("unknow")]
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgCategoriesProxyResponse.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgCategoriesProxyResponse.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgCategoriesProxyResponse.cs	(revision 7149)
@@ -10,31 +10,31 @@
     [Serializable()]
     [XmlRoot(ElementName = "category")]
-    public class PwgCategoryProxyResponse
+    internal class PwgCategoryProxyResponse
     {
         [XmlAttribute(AttributeName = "id")]
-        public Int32 Id { get; set; }
+        internal Int32 Id { get; set; }
         [XmlElement(ElementName = "uppercats")]
-        public String UpperCategoryId { get; set; }
+        internal String UpperCategoryId { get; set; }
         [XmlElement (ElementName = "name")]
-        public String Name { get; set; }
+        internal String Name { get; set; }
         [XmlAttribute(AttributeName = "url")]
-        public String Url { get; set; }
+        internal String Url { get; set; }
         [XmlAttribute(AttributeName = "nb_images")]
-        public Int64 ImagesCount { get; set; }
+        internal Int64 ImagesCount { get; set; }
         [XmlAttribute(AttributeName = "total_nb_images")]
-        public Int64 DeepImagesCount { get; set; }
+        internal Int64 DeepImagesCount { get; set; }
         [XmlAttribute(AttributeName = "nb_categories")]
-        public Int64 SubCategoriesCount { get; set; }
+        internal Int64 SubCategoriesCount { get; set; }
         [XmlAttribute(AttributeName = "max_date_last")]
-        public String LastDate { get; set; }
+        internal String LastDate { get; set; }
     }
 
     [Serializable()]
     [XmlRoot(ElementName = "rsp")]
-    public class PwgCategoriesProxyResponse : PwgBaseProxyReponse
+    internal class PwgCategoriesProxyResponse : PwgBaseProxyReponse
     {
         [XmlArray("categories")]
         [XmlArrayItem("category")]
-        public PwgCategoryProxyResponse[] Categories { get; set; }
+        internal PwgCategoryProxyResponse[] Categories { get; set; }
     }
 }
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgImagesProxyResponse.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgImagesProxyResponse.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgImagesProxyResponse.cs	(revision 7149)
@@ -11,42 +11,42 @@
     [Serializable()]
     [XmlRoot(ElementName = "rsp")]
-    public class PwgImageRateProxyResponse : PwgBaseProxyReponse
+    internal class PwgImageRateProxyResponse : PwgBaseProxyReponse
     {
         [XmlElement("count")]
-        public Int32 Count { get; set; }
+        internal Int32 Count { get; set; }
         [XmlElement("average")]
-        public String Average { get; set; }
+        internal String Average { get; set; }
         [XmlElement("stdev")]
-        public String Stdev { get; set; }
+        internal String Stdev { get; set; }
     }
 
     [Serializable()]
     [XmlRoot(ElementName = "categorie")]
-    public class PwgImageProxyResponse
+    internal class PwgImageProxyResponse
     {
         [XmlAttribute(AttributeName = "id")]
-        public Int32 Id { get; set; }
+        internal Int32 Id { get; set; }
         [XmlAttribute(AttributeName = "width")]
-        public Int32 Width { get; set; }
+        internal Int32 Width { get; set; }
         [XmlAttribute(AttributeName = "height")]
-        public Int32 Height { get; set; }
+        internal Int32 Height { get; set; }
         [XmlAttribute(AttributeName = "file")]
-        public String File { get; set; }
+        internal String File { get; set; }
         [XmlAttribute(AttributeName = "tn_url")]
-        public String UrlThunb { get; set; }
+        internal String UrlThunb { get; set; }
         [XmlAttribute(AttributeName = "element_url")]
-        public String UrlElement { get; set; }
+        internal String UrlElement { get; set; }
         [XmlAttribute(AttributeName = "high_url")]
-        public String UrlHighDef { get; set; }
+        internal String UrlHighDef { get; set; }
         [XmlAttribute(AttributeName = "hit")]
-        public Int64 Counter { get; set; }
+        internal Int64 Counter { get; set; }
 
         [XmlArray("tags")]
         [XmlArrayItem("tag")]
-        public PwgTagProxyResponse[] Tags { get; set; }
+        internal PwgTagProxyResponse[] Tags { get; set; }
 
         [XmlArray("categories")]
         [XmlArrayItem("category")]
-        public PwgCategoryProxyResponse[] Categories { get; set; }
+        internal PwgCategoryProxyResponse[] Categories { get; set; }
 
     }
@@ -54,15 +54,15 @@
     [Serializable()]
     [XmlRoot(ElementName = "images")]
-    public class PwgImageListProxyResponse
+    internal class PwgImageListProxyResponse
     {
         [XmlAttribute("page")]
-        public Int32 Page;
+        internal Int32 Page { get; set; }
         [XmlAttribute("per_page")]
-        public Int32 PerPage;
+        internal Int32 PerPage { get; set; }
         [XmlAttribute("count")]
-        public Int32 Count;
+        internal Int32 Count { get; set; }
 
         [XmlElement("image", typeof(PwgImageProxyResponse))]
-        public PwgImageProxyResponse[] Images { get; set; }
+        internal PwgImageProxyResponse[] Images { get; set; }
 
 
@@ -71,8 +71,8 @@
     [Serializable()]
     [XmlRoot(ElementName = "rsp")]
-    public class PwgImagesProxyResponse : PwgBaseProxyReponse
+    internal class PwgImagesProxyResponse : PwgBaseProxyReponse
     {
         [XmlElement("images")]
-        public PwgImageListProxyResponse ImageList { get; set; }
+        internal PwgImageListProxyResponse ImageList { get; set; }
     }
 
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgSessionProxyResponse.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgSessionProxyResponse.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgSessionProxyResponse.cs	(revision 7149)
@@ -11,18 +11,18 @@
     [XmlRoot(ElementName = "rsp")]
 
-    public class PwgSessionProxyResponse : PwgBaseProxyReponse
+    internal class PwgSessionProxyResponse : PwgBaseProxyReponse
     {
         [XmlElement(ElementName = "username")]
-        public String UserName { get; set; }
+        internal String UserName { get; set; }
         [XmlElement(ElementName = "status")]
-        public string Status { get; set; }
+        internal string Status { get; set; }
         [XmlElement(ElementName = "template")]
-        public String Template { get; set; }
+        internal String Template { get; set; }
         [XmlElement(ElementName = "theme")]
-        public String Theme { get; set; }
+        internal String Theme { get; set; }
         [XmlElement(ElementName = "language")]
-        public String Language { get; set; }
+        internal String Language { get; set; }
         [XmlElement(ElementName = "charset")]
-        public String CharSet { get; set; }    
+        internal String CharSet { get; set; }    
     }
 }
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgTagsProxyResponse.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgTagsProxyResponse.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgTagsProxyResponse.cs	(revision 7149)
@@ -10,26 +10,26 @@
     [Serializable()]
     [XmlRoot(ElementName = "tag")]
-    public class PwgTagProxyResponse
+    internal class PwgTagProxyResponse
     {
         [XmlAttribute(AttributeName = "id")]
-        public Int32 Id { get; set; }
+        internal Int32 Id { get; set; }
         [XmlAttribute(AttributeName = "name")]
-        public String Name { get; set; }
+        internal String Name { get; set; }
         [XmlAttribute(AttributeName = "url_name")]
-        public String UrlName { get; set; }
+        internal String UrlName { get; set; }
         [XmlAttribute(AttributeName = "counter")]
-        public Int64 Counter { get; set; }
+        internal Int64 Counter { get; set; }
         [XmlAttribute(AttributeName = "url")]
-        public String UrlTag { get; set; }
+        internal String UrlTag { get; set; }
     }
 
     [Serializable()]
     [XmlRoot(ElementName = "rsp")]
-    public class PwgTagsProxyResponse : PwgBaseProxyReponse
+    internal class PwgTagsProxyResponse : PwgBaseProxyReponse
     {
         //[XmlElement(ElementName = "tags")]
         [XmlArray("tags")]
         [XmlArrayItem("tag")]
-        public PwgTagProxyResponse[] Tags { get; set; }
+        internal PwgTagProxyResponse[] Tags { get; set; }
     }
 }
Index: /extensions/PiwigoLib/PiwigoLib/Service/PwgCategoriesService.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Service/PwgCategoriesService.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Service/PwgCategoriesService.cs	(revision 7149)
@@ -7,9 +7,10 @@
 using Com.Piwigo.Lib.Proxy.Response;
 using Com.Piwigo.Lib.DTO.Helper;
+using Com.Piwigo.Lib.IService;
 
 namespace Com.Piwigo.Lib.Service
 {
 
-    static public class PwgCategoriesService
+    internal sealed class PwgCategoriesService : IPwgCategoriesService
     {
         /// <summary>
@@ -18,5 +19,5 @@
         /// <param name="sortedByCounter"></param>
         /// <returns></returns>
-        static public List<PwgCategory> GetListOfCategory(Int32? CatgeroryId, Boolean? Recursive, Boolean? PublicOnly)
+        public List<PwgCategory> GetListOfCategory(Int32? CatgeroryId, Boolean? Recursive, Boolean? PublicOnly)
         {
             List<PwgCategory> returnValue = new List<PwgCategory>();
@@ -55,5 +56,5 @@
         /// </summary>
         /// <returns></returns>
-        static public List<PwgCategory> GetAdminListOfCategory()
+        public List<PwgCategory> GetAdminListOfCategory()
         {
             List<PwgCategory> returnValue = new List<PwgCategory>();
@@ -96,5 +97,5 @@
         /// <param name="messageInfo">Message returned by the server</param>
         /// <returns>false, if a error occurs</returns>
-        static public Boolean AddCategory(String categoryName, Int32? upperCatId, ref Int32 newId, ref String messageInfo)
+        public Boolean AddCategory(String categoryName, Int32? upperCatId, ref Int32 newId, ref String messageInfo)
         {
             Boolean returnValue = false;
@@ -139,5 +140,5 @@
         /// <param name="categoryComment"></param>
         /// <returns></returns>
-        static public Boolean UpdateCategoryInfo(Int32 IdCat, String categoryName, String categoryComment)
+        public Boolean UpdateCategoryInfo(Int32 IdCat, String categoryName, String categoryComment)
         {
             Boolean returnValue = false;
@@ -195,5 +196,5 @@
         /// <param name="CountReturned"></param>
         /// <returns></returns>
-        static public List<PwgImage> GetListOfImagesFormCategory(Int32 categoryId,
+        public List<PwgImage> GetListOfImagesFormCategory(Int32 categoryId,
                                                     Boolean? recursive,
                                                     Int32? perPage,
@@ -269,5 +270,5 @@
         /// <param name="response"></param>
         /// <param name="session"></param>
-        static public List<PwgCategory> ConvertProxyResponseToDTO(PwgCategoriesProxyResponse response)
+        internal static List<PwgCategory> ConvertProxyResponseToDTO(PwgCategoriesProxyResponse response)
         {
             List<PwgCategory> returnValue = new List<PwgCategory>();
@@ -287,5 +288,5 @@
         /// <param name="response"></param>
         /// <param name="session"></param>
-        static public PwgCategory ConvertProxyResponseToDTO(PwgCategoryProxyResponse response)
+        internal static PwgCategory ConvertProxyResponseToDTO(PwgCategoryProxyResponse response)
         {
             PwgCategory returnValue = new PwgCategory();
Index: /extensions/PiwigoLib/PiwigoLib/Service/PwgImagesService.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Service/PwgImagesService.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Service/PwgImagesService.cs	(revision 7149)
@@ -8,11 +8,12 @@
 using Com.Piwigo.Lib.Proxy.Response;
 using Com.Piwigo.Lib.DTO.Helper;
+using Com.Piwigo.Lib.IService;
 
 namespace Com.Piwigo.Lib.Service
 {
 
-    static public class PwgImagesService
+    internal sealed class PwgImagesService : IPwgImagesService
     {
-        static public PwgImageRate RateImage(Int32 imageId, Int32 imageRate)
+        public PwgImageRate RateImage(Int32 imageId, Int32 imageRate)
         {
             PwgImageRate returnValue = new PwgImageRate();
@@ -52,5 +53,5 @@
         /// <param name="response"></param>
         /// <param name="session"></param>
-        static public PwgImageRate ConvertProxyResponseToDTO(PwgImageRateProxyResponse response)
+        internal static PwgImageRate ConvertProxyResponseToDTO(PwgImageRateProxyResponse response)
         {
             PwgImageRate returnValue = new PwgImageRate();
@@ -82,5 +83,5 @@
         /// <param name="response"></param>
         /// <param name="session"></param>
-        static public void ConvertProxyResponseToDTO(PwgImagesProxyResponse response,
+        internal static void ConvertProxyResponseToDTO(PwgImagesProxyResponse response,
                                                       List<PwgImage> lstImage, 
                                                       ref Int32 Page, ref Int32 PerPagee, ref Int32 Count)
@@ -94,5 +95,5 @@
         /// <param name="response"></param>
         /// <param name="session"></param>
-        static public void ConvertProxyResponseToDTO(PwgImageListProxyResponse response,
+        internal static void ConvertProxyResponseToDTO(PwgImageListProxyResponse response,
                                                       List<PwgImage> lstImage, 
                                                       ref Int32 Page, ref Int32 PerPagee, ref Int32 Count)
@@ -116,5 +117,5 @@
         /// <param name="response"></param>
         /// <param name="session"></param>
-        static public PwgImage ConvertProxyResponseToDTO(PwgImageProxyResponse response)
+        internal static PwgImage ConvertProxyResponseToDTO(PwgImageProxyResponse response)
         {
             PwgImage returnValue = new PwgImage();
Index: /extensions/PiwigoLib/PiwigoLib/Service/PwgSessionService.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Service/PwgSessionService.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Service/PwgSessionService.cs	(revision 7149)
@@ -7,11 +7,12 @@
 using Com.Piwigo.Lib.Proxy.Response;
 using Com.Piwigo.Lib.DTO.Helper;
+using Com.Piwigo.Lib.IService;
 
 namespace Com.Piwigo.Lib.Service
 {
-  
-    static public class PwgSessionService
+
+    internal sealed class PwgSessionService : IPwgSessionService
     {
-        static private PwgSession PwgSession = null;
+        private PwgSession PwgSession = null;
 
         /// <summary>
@@ -19,5 +20,5 @@
         /// </summary>
         /// <returns></returns>
-        static public PwgSession GetPwgSession()
+        public PwgSession GetPwgSession()
         {
             if (PwgSession == null)
@@ -59,5 +60,5 @@
         /// <param name="Password"></param>
         /// <returns></returns>
-        static public PwgSession Login(String UserName, String Password)
+        public PwgSession Login(String UserName, String Password)
         {
             PwgSession = null;
@@ -88,5 +89,5 @@
         }
 
-        static public PwgSession Logout()
+        public PwgSession Logout()
         {
             PwgSession = null;
@@ -121,5 +122,5 @@
         /// <param name="response"></param>
         /// <param name="session"></param>
-        static private void ConvertProxyResponseToDTO(PwgSessionProxyResponse response, ref PwgSession session)
+        internal static void ConvertProxyResponseToDTO(PwgSessionProxyResponse response, ref PwgSession session)
         {
             if (session == null)
Index: /extensions/PiwigoLib/PiwigoLib/Service/PwgTagsService.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Service/PwgTagsService.cs	(revision 7148)
+++ /extensions/PiwigoLib/PiwigoLib/Service/PwgTagsService.cs	(revision 7149)
@@ -7,9 +7,10 @@
 using Com.Piwigo.Lib.Proxy.Response;
 using Com.Piwigo.Lib.DTO.Helper;
+using Com.Piwigo.Lib.IService;
 
 namespace Com.Piwigo.Lib.Service
 {
 
-    static public class PwgTagsService
+    internal sealed class PwgTagsService : IPwgTagsService
     {
         /// <summary>
@@ -18,5 +19,5 @@
         /// <param name="sortedByCounter"></param>
         /// <returns></returns>
-        static public List<PwgTag> GetListOfTag(Boolean? sortedByCounter)
+        public List<PwgTag> GetListOfTag(Boolean? sortedByCounter)
         {
             List<PwgTag> returnValue = new List<PwgTag>();
@@ -56,5 +57,5 @@
         /// <param name="sortedByCounter"></param>
         /// <returns></returns>
-        static public List<PwgTag> GetAdminListOfTag()
+        public List<PwgTag> GetAdminListOfTag()
         {
             List<PwgTag> returnValue = new List<PwgTag>();
@@ -94,5 +95,5 @@
         /// <param name="tagName"></param>
         /// <returns></returns>
-        static public Boolean AddTag(String tagName, ref Int32 newId, ref String messageInfo)
+        public Boolean AddTag(String tagName, ref Int32 newId, ref String messageInfo)
         {
             Boolean returnValue = false;
@@ -154,5 +155,5 @@
         /// <param name="CountReturned"></param>
         /// <returns></returns>
-        static public List<PwgImage> GetListOfImagesFormTags(List<Int32> tagsId,
+        public List<PwgImage> GetListOfImagesFormTags(List<Int32> tagsId,
                                                             List<String> tagsUrlName,
                                                             List<String> tagsName,
@@ -233,5 +234,5 @@
         /// <param name="response"></param>
         /// <param name="session"></param>
-        static public List<PwgTag> ConvertProxyResponseToDTO(PwgTagsProxyResponse response)
+        internal static  List<PwgTag> ConvertProxyResponseToDTO(PwgTagsProxyResponse response)
         {
             List<PwgTag> returnValue = new List<PwgTag>();
@@ -251,5 +252,5 @@
         /// <param name="response"></param>
         /// <param name="session"></param>
-        static public PwgTag ConvertProxyResponseToDTO(PwgTagProxyResponse response)
+        internal static PwgTag ConvertProxyResponseToDTO(PwgTagProxyResponse response)
         {
             PwgTag returnValue = new PwgTag();
Index: /extensions/PiwigoLib/TestPiwigoLib/Form1.cs
===================================================================
--- /extensions/PiwigoLib/TestPiwigoLib/Form1.cs	(revision 7148)
+++ /extensions/PiwigoLib/TestPiwigoLib/Form1.cs	(revision 7149)
@@ -1,15 +1,7 @@
 ﻿using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
-using Com.Piwigo.Lib.Proxy;
-using Com.Piwigo.Lib.Service;
+using Com.Piwigo.Lib.IService;
 using Com.Piwigo.Lib.DTO;
-using Com.Piwigo.Lib.Proxy.Response;
 
 
@@ -29,23 +21,26 @@
         private void button1_Click(object sender, EventArgs e)
         {
-            PwgConfigProxy.PwgUserAgent = "TestPiwigoLib";
-            PwgConfigProxy.PwgServeurUriBuilder.Host = tbServer.Text;
-            PwgConfigProxy.PwgServeurUriBuilder.Path = "phpwebgallery/ws.php";
-            PwgConfigProxy.PwgServeurUriBuilder.Scheme = "http://";
+            UriBuilder urib = new UriBuilder();
+            urib.Host = tbServer.Text;
+            urib.Path = "phpwebgallery/ws.php";
+            urib.Scheme = "http://";
 
-            Console.WriteLine(PwgConfigProxy.PwgServeurUriBuilder.Uri.AbsoluteUri);
+            PwgServiceProvider.Instance.PwgSetupService.Setup("TestPiwigoLib", null, urib.Uri);
+
+
+            Console.WriteLine(urib.Uri.AbsoluteUri);
 
             try
             {
                 PwgSession sess = null;
-                sess = PwgSessionService.GetPwgSession();
+                sess = PwgServiceProvider.Instance.PwgSessionService.GetPwgSession();
                 Console.WriteLine("user : " + sess.UserName + " " + sess.Status);
 
-                sess = PwgSessionService.Login(tbUser.Text,tbPassword.Text);
+                sess = PwgServiceProvider.Instance.PwgSessionService.Login(tbUser.Text, tbPassword.Text);
                 Console.WriteLine("user : " + sess.UserName + " " + sess.Status);
 
-                //Boolean rc = PwgTagsService.AddTag("Loic");
+                //Boolean rc = PwgServiceProvider.Instance.PwgTagsService.AddTag("Loic");
 
-                //List<PwgTag> lstTag = PwgTagsService.GetAdminListOfTag();
+                //List<PwgTag> lstTag = PwgServiceProvider.Instance.PwgTagsService.GetAdminListOfTag();
 
                 //Int32 Page = 0;
@@ -53,9 +48,9 @@
                 //Int32 Count = 0;
 
-                //List<PwgImage> lstImg = PwgTagsService.GetListOfImagesFormTags(new List<Int32>() { 1, 7 },
+                //List<PwgImage> lstImg = PwgServiceProvider.Instance.PwgTagsService.GetListOfImagesFormTags(new List<Int32>() { 1, 7 },
                 //    null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
                 //    ref Page, ref PerPage, ref Count);
 
-                //List<PwgImage> lstImg = PwgCategoriesService.GetListOfImagesFormCategory(1,
+                //List<PwgImage> lstImg = PwgServiceProvider.Instance.PwgCategoriesService.GetListOfImagesFormCategory(1,
                 //    null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
                 //    ref Page, ref PerPage, ref Count);
@@ -63,15 +58,15 @@
                 //Console.WriteLine("lstImg : Page " + Page.ToString() + " PerPage " + PerPage);
 
-                //List<PwgCategory> lstCat = PwgCategoriesService.GetAdminListOfCategory(); 
+                //List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory(); 
 
                 //Int32 newid = 0;
                 //String msg = String.Empty;
-                //Boolean rc = PwgCategoriesService.AddCategory("test_cat", 1, ref  newid, ref msg);
+                //Boolean rc = PwgServiceProvider.Instance.PwgCategoriesService.AddCategory("test_cat", 1, ref  newid, ref msg);
                 //Console.WriteLine(String.Format("newid : {0} message : {1}", newid,msg));
-                //rc = PwgCategoriesService.UpdateCategoryInfo(newid, "test2", "rename cat");
+                //rc = PwgServiceProvider.Instance.PwgCategoriesService.UpdateCategoryInfo(newid, "test2", "rename cat");
 
-                PwgImageRate imgRate = PwgImagesService.RateImage(1, 5);
+                PwgImageRate imgRate = PwgServiceProvider.Instance.PwgImagesService.RateImage(1, 5);
 
-                sess = PwgSessionService.Logout();
+                sess = PwgServiceProvider.Instance.PwgSessionService.Logout();
                 Console.WriteLine("user : " + sess.UserName + " " + sess.Status);
             }
