示例#1
0
 private static PublicDummy ConvertToPublic(ProtoDummy dummy)
 {
     if (dummy == null || dummy.Id == "")
     {
         return(null);
     }
     return(new PublicDummy
     {
         Id = dummy.Id,
         Key = dummy.Key,
         Content = dummy.Content
     });
 }
示例#2
0
 private static Dummy ConvertFromPublic(ProtoDummy dummy)
 {
     if (dummy == null)
     {
         return(null);
     }
     return(new Dummy
     {
         Id = dummy.Id,
         Key = dummy.Key,
         Content = dummy.Content
     });
 }