Example #1
0
        public ModFile(string text, bool extractVersionFromText = true) : base(text)
        {
            if (extractVersionFromText)
            {
                try
                {
                    MCVersion = new MCVersion(text, true);

                    try
                    {
                        Version = new MCVersion(text, true, 1);
                    }
                    catch (ArgumentException)
                    {
                        Version = null;
                    }
                }
                catch (ArgumentException)
                {
                    MCVersion = null;
                }
            }
            else
            {
                Version   = null;
                MCVersion = null;
            }
        }
Example #2
0
 public ModFile(string text, MCVersion mcVersion, MCVersion version) : base(text)
 {
     Version   = version;
     MCVersion = mcVersion;
 }