Inheritance: Microsoft.WindowsAzure.StorageClient.TableServiceEntity
Exemplo n.º 1
0
        public static SyncStatus ToModel(this SyncStatusRow row)
        {
            if (row == null)
            {
                return(null);
            }

            return(new SyncStatus()
            {
                DeploymentId = row.PartitionKey,
                RoleInstanceId = row.RoleInstanceId,
                SiteName = row.SiteName,
                Status = (SyncInstanceStatus)Enum.Parse(typeof(SyncInstanceStatus), row.Status),
                SyncTimestamp = row.Timestamp,
                IsOnline = row.IsOnline.GetValueOrDefault(true)
            });
        }
Exemplo n.º 2
0
        public static SyncStatus ToModel(this SyncStatusRow row)
        {
            if (row == null)
            {
                return(null);
            }

            return(new SyncStatus
            {
                DeploymentId = row.PartitionKey,
                RoleInstanceId = row.RoleInstanceId,
                SiteName = row.SiteName,
                Status = (SyncInstanceStatus)Enum.Parse(typeof(SyncInstanceStatus), row.Status),
                SyncTimestamp = row.Timestamp,
                IsOnline = row.IsOnline.GetValueOrDefault(true),
                LastError = !string.IsNullOrEmpty(row.LastError) ? new Exception(row.LastError) : null
            });
        }