Version


Node Information
Gets running Project's version information.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Version OUT String MULTIPLE FALSE FALSE
Major OUT Int32 MULTIPLE FALSE FALSE
Minor OUT Int32 MULTIPLE FALSE FALSE
Build OUT Int32 MULTIPLE FALSE FALSE
Revision OUT Int32 MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.Application.Information
{
    [IsNode("Version")]
    public class AppVersion : Node
    {
        Port version = new Port(PortType.OUT, typeof(string), AcceptsLinks.MULTIPLE, "Version");
        Port major = new Port(PortType.OUT, typeof(int), AcceptsLinks.MULTIPLE, "Major");
        Port minor = new Port(PortType.OUT, typeof(int), AcceptsLinks.MULTIPLE, "Minor");
        Port build = new Port(PortType.OUT, typeof(int), AcceptsLinks.MULTIPLE, "Build");
        Port revision = new Port(PortType.OUT, typeof(int), AcceptsLinks.MULTIPLE, "Revision");
        public AppVersion()
        {
            Name = "Version";
            AddPort(version);
            AddPort(major);
            AddPort(minor);
            AddPort(build);
            AddPort(revision);
            version.Instructions = "Application.ProductVersion";
            major.Instructions = "System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major";
            minor.Instructions = "System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Minor";
            build.Instructions = "System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Build";
            revision.Instructions = "System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Revision";
            Information = "Gets running Project's version information.";
        }
    }
}