public static string GetString(this ERLVerbs _verb, Noun _noun, EVerbType _type)
		{
			return RusLanguageProcessor.GetString(_verb, _type, _noun);
		}
		public static string GetString(this ERLVerbs _verb, ESex _sex, EVerbType _type)
		{
			return RusLanguageProcessor.GetString(_verb, _type, _sex);
		}
		public static string GetString(ERLVerbs _verb, EVerbType _type, params Noun[] _nouns)
		{
			return m_rverbs[_verb].To(_nouns.Length == 1 ? _nouns[0].Sex : ESex.PLURAL, _type);
		}
		public static string GetString(ERLVerbs _verb, EVerbType _type, ESex _sex)
		{
			return m_rverbs[_verb].To(_sex, _type);
		}
Exemple #5
0
 public static string GetString(this ERLVerbs _verb, ESex _sex, EVerbType _type)
 {
     return(RusLanguageProcessor.GetString(_verb, _type, _sex));
 }
Exemple #6
0
 public static string GetString(this EALVerbs _verb, Noun _noun, EVerbType _type)
 {
     return(World.AL.GetString(_verb, _type, _noun));
 }
Exemple #7
0
 public static string GetString(this ERLVerbs _verb, Noun _noun, EVerbType _type)
 {
     return(RusLanguageProcessor.GetString(_verb, _type, _noun));
 }
Exemple #8
0
 public static string GetString(ERLVerbs _verb, EVerbType _type, ESex _sex)
 {
     return(m_rverbs[_verb].To(_sex, _type));
 }
Exemple #9
0
 public static string GetString(ERLVerbs _verb, EVerbType _type, params Noun[] _nouns)
 {
     return(m_rverbs[_verb].To(_nouns.Length == 1 ? _nouns[0].Sex : ESex.PLURAL, _type));
 }
Exemple #10
0
		public static string To(this Verb _verb, ESex _sex, EVerbType _type)
		{
			var v = _verb.SameAs[m_rnd.Next(_verb.SameAs.Count)];
			var text = _type==EVerbType.IN_PROCESS?v.InProcess : v.Done;
			if (string.IsNullOrEmpty(text)) return text;
			if(_sex==ESex.MALE) return text;
			if (_type == EVerbType.DONE)
			{
				if (text.EndsWith("ил") || text.EndsWith("ал") || text.EndsWith("ел"))
				{
					switch (_sex)
					{
						case ESex.FEMALE:
							return text + "а";
						case ESex.IT:
							return text + "о";
						case ESex.PLURAL:
						case ESex.PLURAL_FEMALE:
							return text + "и";
						default:
							throw new ArgumentOutOfRangeException("_sex");
					}
				}
				else if (text.EndsWith("ся"))
				{
					switch (_sex)
					{
						case ESex.FEMALE:
							return text.Substring(0, text.Length - 2) + "ась";
						case ESex.IT:
							return text.Substring(0, text.Length - 2) + "ось";
						case ESex.PLURAL:
						case ESex.PLURAL_FEMALE:
							return text.Substring(0, text.Length - 2) + "ись";
						default:
							throw new ArgumentOutOfRangeException("_sex");
					}
				}
				else if (text.EndsWith("ыл") || text.EndsWith("ял"))
				{
					switch (_sex)
					{
						case ESex.FEMALE:
							return text + "а";
						case ESex.IT:
							return text + "о";
						case ESex.PLURAL:
						case ESex.PLURAL_FEMALE:
							return text + "и";
						default:
							throw new ArgumentOutOfRangeException("_sex");
					}
				}
				else if (text.EndsWith("ог"))
				{
					switch (_sex)
					{
						case ESex.FEMALE:
							return text + "ла";
						case ESex.IT:
							return text + "ло";
						case ESex.PLURAL:
						case ESex.PLURAL_FEMALE:
							return text + "ли";
						default:
							throw new ArgumentOutOfRangeException("_sex");
					}
				}
			}
			else
			{
				switch (_sex)
				{
					case ESex.MALE:
					case ESex.FEMALE:
					case ESex.IT:
						return text;
					case ESex.PLURAL:
					case ESex.PLURAL_FEMALE:
						if (text.EndsWith("ит"))
						{
							return text.Substring(0, text.Length - 2) + "ят";
						}
						if (text.EndsWith("ет"))
						{
							return text.Substring(0, text.Length - 2) + "ют";
						}
						if (text.EndsWith("ется"))
						{
							return text.Substring(0, text.Length - 4) + "ются";
						}
						if (text.EndsWith("ится"))
						{
							return text.Substring(0, text.Length - 4) + "атся";
						}
						break;
					default:
						throw new ArgumentOutOfRangeException("_sex");
				}
			}
			throw new NotImplementedException(text + " " + _sex + " " + _type);
		}
Exemple #11
0
        public static string To(this Verb _verb, ESex _sex, EVerbType _type)
        {
            var v    = _verb.SameAs[m_rnd.Next(_verb.SameAs.Count)];
            var text = _type == EVerbType.IN_PROCESS?v.InProcess : v.Done;

            if (string.IsNullOrEmpty(text))
            {
                return(text);
            }
            if (_sex == ESex.MALE)
            {
                return(text);
            }
            if (_type == EVerbType.DONE)
            {
                if (text.EndsWith("ил") || text.EndsWith("ал") || text.EndsWith("ел"))
                {
                    switch (_sex)
                    {
                    case ESex.FEMALE:
                        return(text + "а");

                    case ESex.IT:
                        return(text + "о");

                    case ESex.PLURAL:
                    case ESex.PLURAL_FEMALE:
                        return(text + "и");

                    default:
                        throw new ArgumentOutOfRangeException("_sex");
                    }
                }
                else if (text.EndsWith("ся"))
                {
                    switch (_sex)
                    {
                    case ESex.FEMALE:
                        return(text.Substring(0, text.Length - 2) + "ась");

                    case ESex.IT:
                        return(text.Substring(0, text.Length - 2) + "ось");

                    case ESex.PLURAL:
                    case ESex.PLURAL_FEMALE:
                        return(text.Substring(0, text.Length - 2) + "ись");

                    default:
                        throw new ArgumentOutOfRangeException("_sex");
                    }
                }
                else if (text.EndsWith("ыл") || text.EndsWith("ял"))
                {
                    switch (_sex)
                    {
                    case ESex.FEMALE:
                        return(text + "а");

                    case ESex.IT:
                        return(text + "о");

                    case ESex.PLURAL:
                    case ESex.PLURAL_FEMALE:
                        return(text + "и");

                    default:
                        throw new ArgumentOutOfRangeException("_sex");
                    }
                }
                else if (text.EndsWith("ог"))
                {
                    switch (_sex)
                    {
                    case ESex.FEMALE:
                        return(text + "ла");

                    case ESex.IT:
                        return(text + "ло");

                    case ESex.PLURAL:
                    case ESex.PLURAL_FEMALE:
                        return(text + "ли");

                    default:
                        throw new ArgumentOutOfRangeException("_sex");
                    }
                }
            }
            else
            {
                switch (_sex)
                {
                case ESex.MALE:
                case ESex.FEMALE:
                case ESex.IT:
                    return(text);

                case ESex.PLURAL:
                case ESex.PLURAL_FEMALE:
                    if (text.EndsWith("ит"))
                    {
                        return(text.Substring(0, text.Length - 2) + "ят");
                    }
                    if (text.EndsWith("ет"))
                    {
                        return(text.Substring(0, text.Length - 2) + "ют");
                    }
                    if (text.EndsWith("ется"))
                    {
                        return(text.Substring(0, text.Length - 4) + "ются");
                    }
                    if (text.EndsWith("ится"))
                    {
                        return(text.Substring(0, text.Length - 4) + "атся");
                    }
                    break;

                default:
                    throw new ArgumentOutOfRangeException("_sex");
                }
            }
            throw new NotImplementedException(text + " " + _sex + " " + _type);
        }