public void Rename(WorkshopName newName) { if (_state.Status == WorkshopStatus.InActive) { throw new InvalidOperationException("Workshop is inactive"); } RaiseEvent(new WorkshopRenamed(Id, newName, _state.Name)); }
public string GetI18nKeyword() { if (@Enum.Type == typeof(PlayerSelector) && WorkshopName.StartsWith("Slot")) { return("Slot"); } if (@Enum.Type == typeof(Button) && WorkshopName.StartsWith("Ability")) { return("Ability"); } if ((@Enum.Type == typeof(Team) || @Enum.Type == typeof(Color)) && WorkshopName.StartsWith("Team")) { return("Team"); } return(WorkshopName); }
public string ToWorkshop(OutputLanguage language, ToWorkshopContext context) { string numTranslate(string name) { return(LanguageInfo.Translate(language, name) + WorkshopName.Substring(name.Length)); } if (@Enum.Type == typeof(PlayerSelector) && WorkshopName.StartsWith("Slot")) { return(numTranslate("Slot")); } if (@Enum.Type == typeof(Button) && WorkshopName.StartsWith("Ability")) { return(numTranslate("Ability")); } if ((@Enum.Type == typeof(Team) || @Enum.Type == typeof(Color)) && WorkshopName.StartsWith("Team")) { return(numTranslate("Team")); } return(LanguageInfo.Translate(language, WorkshopName).RemoveStructuralChars()); }
public string ToWorkshop(OutputLanguage language) { string numTranslate(string name) { return(I18n.I18n.Translate(language, name) + WorkshopName.Substring(name.Length)); } if (@Enum.Type == typeof(PlayerSelector) && WorkshopName.StartsWith("Slot")) { return(numTranslate("Slot")); } if (@Enum.Type == typeof(Button) && WorkshopName.StartsWith("Ability")) { return(numTranslate("Ability")); } if ((@Enum.Type == typeof(Team) || @Enum.Type == typeof(Color)) && WorkshopName.StartsWith("Team")) { return(numTranslate("Team")); } return(I18n.I18n.Translate(language, WorkshopName)); }
public WorkshopAggregate(NonEmptyIdentity id, WorkshopName name, NonEmptyIdentity cityId) : this(id) { RaiseEvent(new WorkshopAdded(id, name, cityId, WorkshopStatus.Active)); }