예제 #1
0
 /// <inheritdoc/>
 public ITenant MapTenant(object source)
 {
     Client.Models.Tenant tenantFromService = ((JObject)source).ToObject <Client.Models.Tenant>();
     return(new Tenant(
                tenantFromService.Id,
                tenantFromService.Name,
                this.propertyBagFactory.Create(tenantFromService.Properties))
     {
         ETag = tenantFromService.ETag,
     });
 }
예제 #2
0
        /// <inheritdoc/>
        public Client.Models.Tenant MapTenant(ITenant source)
        {
            var result = new Client.Models.Tenant
            {
                Id          = source.Id,
                Name        = source.Name,
                ContentType = source.ContentType,
                ETag        = source.ETag,
                Properties  = ((JObject)source.Properties).ToObject <Dictionary <string, object> >(),
            };

            return(result);
        }