コード例 #1
0
 public ServiceRefAdmin.Admin ConvertToServiceAdmin(ModelLayer.Admin desktopAdmin)
 {
     ServiceRefAdmin.Admin serviceAdmin = null;
     if (desktopAdmin != null)
     {
         serviceAdmin = new ServiceRefAdmin.Admin {
             Salt     = desktopAdmin.Salt,
             Hash     = desktopAdmin.Hash,
             Email    = desktopAdmin.Email,
             Password = desktopAdmin.Password
         };
     }
     return(serviceAdmin);
 }
コード例 #2
0
 public ModelLayer.Admin ConvertFromServiceAdmin(ServiceRefAdmin.Admin serviceAdmin)
 {
     ModelLayer.Admin clientAdmin = null;
     if (serviceAdmin != null)
     {
         clientAdmin = new ModelLayer.Admin {
             Salt     = serviceAdmin.Salt,
             Hash     = serviceAdmin.Hash,
             Email    = serviceAdmin.Email,
             Password = serviceAdmin.Password
         };
     }
     return(clientAdmin);
 }