/// <summary> /// Gets a description of this component. /// </summary> /// <returns>Descriptive text about the component</returns> public virtual string GetDescription() { string toReturn = ""; if (Object.ReferenceEquals(Parent, Manager.RootComponent)) { toReturn += Name; if (IsReserved) { if (ReservedFor.GetRoot().GetComponent <Creature>().HasValue(out var creature)) { toReturn += " (Reserved for " + creature.Stats.FullName + ")"; } else { toReturn += " (Reserved)"; } } } foreach (GameComponent component in Children) { string componentDesc = component.GetDescription(); if (!String.IsNullOrEmpty(componentDesc)) { toReturn += "\n "; toReturn += componentDesc; } } return(toReturn); }
public ExternalServerDTO GetDTO() { return(new() { Id = Id, Status = Status, StatusLastChecked = StatusLastChecked, ReservationType = ReservationType, ReservedFor = ReservedFor?.ToString() ?? "unset", PublicAddress = PublicAddress, RunningSince = RunningSince, ProvisionedFully = ProvisionedFully, WantsMaintenance = WantsMaintenance, LastMaintenance = LastMaintenance, UsedDiskSpace = UsedDiskSpace, CleanUpQueued = CleanUpQueued, SSHKeyFileName = SSHKeyFileName, Priority = Priority, CreatedAt = CreatedAt, UpdatedAt = UpdatedAt, }); }
public ControlledServerDTO GetDTO() { return(new() { Id = Id, Status = Status, StatusLastChecked = StatusLastChecked, ReservationType = ReservationType, ReservedFor = ReservedFor?.ToString() ?? "unset", PublicAddress = PublicAddress, RunningSince = RunningSince, TotalRuntime = TotalRuntime, ProvisionedFully = ProvisionedFully, InstanceId = InstanceId, WantsMaintenance = WantsMaintenance, LastMaintenance = LastMaintenance, UsedDiskSpace = UsedDiskSpace, CleanUpQueued = CleanUpQueued, CreatedAt = CreatedAt, UpdatedAt = UpdatedAt, }); }
public BlankControl() { Reserved = ReservedFor.BEFORE_HOR; }