コード例 #1
0
 public void VisitRevision(PluginRevision revision)
 {
     Debug.WriteLine("Plugin version {0} by {1}: {2}", revision.Version, revision.Researcher, revision.Description);
 }
コード例 #2
0
 public void VisitRevision(PluginRevision revision)
 {
     _output.WriteStartElement("revision");
     _output.WriteAttributeString("author", revision.Researcher);
     _output.WriteAttributeString("version", revision.Version.ToString());
     _output.WriteString(revision.Description);
     _output.WriteEndElement();
 }
コード例 #3
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);

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

            PluginRevision revision = new PluginRevision(author, (int)version, description);
            revisions[version] = revision;
        }
コード例 #4
0
 public void VisitRevision(PluginRevision revision)
 {
     _pluginRevisions.Add(revision);
 }