Example #1
0
        private void ReadRevision(XmlReader reader)
        {
            string author = "", description;
            float  version = 1;

            if (reader.MoveToAttribute("author"))
            {
                author = reader.Value;
            }

            if (reader.MoveToAttribute("version"))
            {
                version = float.Parse(reader.Value.TrimEnd('a', 'b', 'c'));

                // Handle a letter suffix (some Entity plugins use this)
                char suffix = reader.Value[reader.Value.Length - 1];
                if (suffix >= 'a' && suffix <= 'c')
                {
                    version += (suffix - 'a' + 1) * 0.001f;
                }
            }

            reader.MoveToElement();
            description = reader.ReadElementContentAsString();

            var revision = new PluginRevision(author, (int)version, description);

            revisions[version] = revision;
        }
 public void VisitRevision(PluginRevision revision)
 {
     _output.WriteStartElement("revision");
     _output.WriteAttributeString("author", revision.Researcher);
     _output.WriteAttributeString("version", revision.Version.ToString(CultureInfo.InvariantCulture));
     _output.WriteString(revision.Description);
     _output.WriteEndElement();
 }
Example #3
0
 public void VisitRevision(PluginRevision revision)
 {
     Debug.WriteLine("Plugin version {0} by {1}: {2}", revision.Version, revision.Researcher, revision.Description);
 }
Example #4
0
 public void VisitRevision(PluginRevision revision)
 {
     _output.WriteStartElement("revision");
     _output.WriteAttributeString("author", revision.Researcher);
     _output.WriteAttributeString("version", revision.Version.ToString(CultureInfo.InvariantCulture));
     _output.WriteString(revision.Description);
     _output.WriteEndElement();
 }
Example #5
0
 public void VisitRevision(PluginRevision revision)
 {
     Debug.WriteLine(Indent() + "Plugin version {0} by {1}: {2}", revision.Version, revision.Researcher, revision.Description);
 }
Example #6
0
        private void ReadRevision(XmlReader reader)
        {
            string author = "", description;
            float version = 1;

            if (reader.MoveToAttribute("author"))
                author = reader.Value;

            if (reader.MoveToAttribute("version"))
            {
                version = float.Parse(reader.Value.TrimEnd('a', 'b', 'c'));

                // Handle a letter suffix (some Entity plugins use this)
                char suffix = reader.Value[reader.Value.Length - 1];
                if (suffix >= 'a' && suffix <= 'c')
                    version += (suffix - 'a' + 1)*0.001f;
            }

            reader.MoveToElement();
            description = reader.ReadElementContentAsString();

            var revision = new PluginRevision(author, (int) version, description);
            revisions[version] = revision;
        }
Example #7
0
 public void VisitRevision(PluginRevision revision)
 {
     _pluginRevisions.Add(revision);
 }
Example #8
0
		public void VisitRevision(PluginRevision revision)
		{
		}