示例#1
0
        private void AddPlotApiSummary()
        {
            string    xmlPath = "../../../../../src/ScottPlot/ScottPlot.xml";
            XDocument xmlDoc  = XDocument.Load(xmlPath);

            AddHeading("The Plot Module", 1);
            Add("The Plot module is the primary way to interct with ScottPlot. " +
                "It has helper methods to make it easy to create and add Plottable objects. " +
                "Use the Render() method to render the plot as an image.");

            //AddHeading("Fields", 3);
            //foreach (var field in Locate.GetPlotFields().Select(x => new DocumentedField(x, xmlDoc)))
            //Add(OneLineInfo(field, "plot/"));

            AddHeading("Properties", 2);
            foreach (var property in Locate.GetPlotProperties().Select(x => new DocumentedProperty(x, xmlDoc)))
            {
                Add(OneLineInfo(property, "api/plot/"));
            }

            AddHeading("Methods", 2);
            foreach (var method in Locate.GetPlotMethodsNoAdd().Select(x => new DocumentedMethod(x, xmlDoc)))
            {
                Add(OneLineInfo(method, "api/plot/"));
            }

            AddHeading("Methods for Creating Plottables", 2);
            foreach (var method in Locate.GetPlotMethodsOnlyAdd().Select(x => new DocumentedMethod(x, xmlDoc)))
            {
                Add(OneLineInfo(method, "api/plot/"));
            }

            AddHeading("Plottable Types", 1);
            foreach (Type plottableType in Locate.GetPlottableTypes())
            {
                var classInfo = new DocumentedClass(plottableType, xmlDoc);
                Add(OneLineInfo(classInfo, $"api/plottable/{Sanitize(plottableType.Name)}/"));
            }
        }