Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
        /// from the specified stream.
        /// </summary>
        /// <param name="moStream"></param>
        /// <param name="pluralRuleGenerator"></param>
        /// <param name="parser"></param>
        public MoLoader(Stream moStream, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser)
        {
            if (moStream == null)
                throw new ArgumentNullException("moStream");
            if (pluralRuleGenerator == null)
                throw new ArgumentNullException("pluralRuleGenerator");
            if (parser == null)
                throw new ArgumentNullException("parser");

            this._MoStream = moStream;
            this.PluralRuleGenerator = pluralRuleGenerator;
            this.Parser = parser;
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
        /// from the specified path.
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="pluralRuleGenerator"></param>
        /// <param name="parser"></param>
        public MoLoader(string filePath, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser)
        {
            if (filePath == null)
            {
                throw new ArgumentNullException("filePath");
            }
            if (pluralRuleGenerator == null)
            {
                throw new ArgumentNullException("pluralRuleGenerator");
            }
            if (parser == null)
            {
                throw new ArgumentNullException("parser");
            }

            this._FilePath           = filePath;
            this.PluralRuleGenerator = pluralRuleGenerator;
            this.Parser = parser;
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
        /// from the specified stream.
        /// </summary>
        /// <param name="moStream"></param>
        /// <param name="pluralRuleGenerator"></param>
        /// <param name="parser"></param>
        public MoLoader(Stream moStream, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser)
        {
            if (moStream == null)
            {
                throw new ArgumentNullException("moStream");
            }
            if (pluralRuleGenerator == null)
            {
                throw new ArgumentNullException("pluralRuleGenerator");
            }
            if (parser == null)
            {
                throw new ArgumentNullException("parser");
            }

            this._MoStream           = moStream;
            this.PluralRuleGenerator = pluralRuleGenerator;
            this.Parser = parser;
        }
Пример #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
        /// that will be located in the localeDir using the domain name and catalog's culture info.
        /// </summary>
        /// <param name="domain"></param>
        /// <param name="localeDir"></param>
        /// <param name="pluralRuleGenerator"></param>
        /// <param name="parser"></param>
        public MoLoader(string domain, string localeDir, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser)
        {
            if (domain == null)
            {
                throw new ArgumentNullException("domain");
            }
            if (localeDir == null)
            {
                throw new ArgumentNullException("localeDir");
            }
            if (pluralRuleGenerator == null)
            {
                throw new ArgumentNullException("pluralRuleGenerator");
            }
            if (parser == null)
            {
                throw new ArgumentNullException("parser");
            }

            this._Domain             = domain;
            this._LocaleDir          = localeDir;
            this.PluralRuleGenerator = pluralRuleGenerator;
            this.Parser = parser;
        }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
 /// from the specified stream.
 /// </summary>
 /// <param name="moStream"></param>
 /// <param name="pluralRuleGenerator"></param>
 public MoLoader(Stream moStream, IPluralRuleGenerator pluralRuleGenerator)
     : this(moStream, pluralRuleGenerator, new MoFileParser())
 {
 }
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
 /// from the specified path.
 /// </summary>
 /// <param name="filePath"></param>
 /// <param name="pluralRuleGenerator"></param>
 public MoLoader(string filePath, IPluralRuleGenerator pluralRuleGenerator)
     : this(filePath, pluralRuleGenerator, new MoFileParser())
 {
 }
Пример #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
 /// that will be located in the localeDir using the domain name and catalog's culture info.
 /// </summary>
 /// <param name="domain"></param>
 /// <param name="localeDir"></param>
 /// <param name="pluralRuleGenerator"></param>
 public MoLoader(string domain, string localeDir, IPluralRuleGenerator pluralRuleGenerator)
     : this(domain, localeDir, pluralRuleGenerator, new MoFileParser())
 {
 }
Пример #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
        /// from the specified path.
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="pluralRuleGenerator"></param>
        /// <param name="parser"></param>
        public MoLoader(string filePath, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser)
        {
            if (filePath == null)
                throw new ArgumentNullException("filePath");
            if (pluralRuleGenerator == null)
                throw new ArgumentNullException("pluralRuleGenerator");
            if (parser == null)
                throw new ArgumentNullException("parser");

            this._FilePath = filePath;
            this.PluralRuleGenerator = pluralRuleGenerator;
            this.Parser = parser;
        }
Пример #9
0
 public CustomMoLoader(string filePath, IPluralRuleGenerator pluralRuleGenerator) : base(filePath, pluralRuleGenerator)
 {
 }
Пример #10
0
 public MoLoader(string filePath, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser) : base(filePath, pluralRuleGenerator, parser)
 {
 }
Пример #11
0
 public MoLoader(string domain, string localeDir, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser) : base(domain, localeDir, pluralRuleGenerator, parser)
 {
 }
Пример #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
 /// from the specified stream.
 /// </summary>
 /// <param name="moStream"></param>
 /// <param name="pluralRuleGenerator"></param>
 public MoLoader(Stream moStream, IPluralRuleGenerator pluralRuleGenerator)
     : this(moStream, pluralRuleGenerator, new MoFileParser())
 {
 }
Пример #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
 /// from the specified path.
 /// </summary>
 /// <param name="filePath"></param>
 /// <param name="pluralRuleGenerator"></param>
 public MoLoader(string filePath, IPluralRuleGenerator pluralRuleGenerator)
     : this(filePath, pluralRuleGenerator, new MoFileParser())
 {
 }
Пример #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
 /// that will be located in the localeDir using the domain name and catalog's culture info.
 /// </summary>
 /// <param name="domain"></param>
 /// <param name="localeDir"></param>
 /// <param name="pluralRuleGenerator"></param>
 public MoLoader(string domain, string localeDir, IPluralRuleGenerator pluralRuleGenerator)
     : this(domain, localeDir, pluralRuleGenerator, new MoFileParser())
 {
 }
Пример #15
0
 public CustomMoLoader(Stream moStream, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser) : base(moStream, pluralRuleGenerator, parser)
 {
 }
Пример #16
0
 public CustomMoLoader(string domain, string localeDir, IPluralRuleGenerator pluralRuleGenerator) : base(domain, localeDir, pluralRuleGenerator)
 {
 }
Пример #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseCatalog"/> class that has no translations
 /// using given culture info and given plural rule generator to generate rule for given culture.
 /// </summary>
 /// <param name="cultureInfo"></param>
 /// <param name="pluralRuleGenerator"></param>
 protected BaseCatalog(CultureInfo cultureInfo, IPluralRuleGenerator pluralRuleGenerator)
     : this(cultureInfo, pluralRuleGenerator.CreateRule(cultureInfo))
 {
 }
Пример #18
0
 public CustomMoLoader(Stream moStream, IPluralRuleGenerator pluralRuleGenerator) : base(moStream, pluralRuleGenerator)
 {
 }
Пример #19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MoLoader"/> class which will try to load a MO file
        /// that will be located in the localeDir using the domain name and catalog's culture info.
        /// </summary>
        /// <param name="domain"></param>
        /// <param name="localeDir"></param>
        /// <param name="pluralRuleGenerator"></param>
        /// <param name="parser"></param>
        public MoLoader(string domain, string localeDir, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser)
        {
            if (domain == null)
                throw new ArgumentNullException("domain");
            if (localeDir == null)
                throw new ArgumentNullException("localeDir");
            if (pluralRuleGenerator == null)
                throw new ArgumentNullException("pluralRuleGenerator");
            if (parser == null)
                throw new ArgumentNullException("parser");

            this._Domain = domain;
            this._LocaleDir = localeDir;
            this.PluralRuleGenerator = pluralRuleGenerator;
            this.Parser = parser;
        }