Exemplo n.º 1
0
        /// <summary>
        /// Serializes the experiment.
        /// </summary>
        /// <param name="experiment">The experiment to be serialized.</param>
        /// <param name="writer">The writer.</param>
        /// <param name="library">The library - needed for post XML processing to determine if components has been located in library, and needed to show their definition and description.</param>
        public static void SerializeExperiment(XmlWriter writer, IExperiment experiment)
        {
            var factory = new ExperimentFactoryWriter();

            experiment.SerializeToXml(writer,
                                      (QuickGraph.VertexIdentity <ExperimentNode>)(v => v.ID),
                                      (QuickGraph.EdgeIdentity <ExperimentNode, ExperimentNodeConnection>)(e => e.ID),
                                      "graph", "node", "edge", "",
                                      factory.WriteGraphAttributes,
                                      factory.WriteNodeAttributes,
                                      factory.WriteEdgeAttributes);
        }
        /// <summary>
        /// Serializes the experiment.
        /// </summary>
        /// <param name="experiment">The experiment to be serialized.</param>
        /// <param name="writer">The writer.</param>
        /// <param name="library">The library - needed for post XML processing to determine if components has been located in library, and needed to show their definition and description.</param>
        public static void SerializeExperiment(XmlWriter writer, IExperiment experiment)
        {
            var factory = new ExperimentFactoryWriter();

            experiment.SerializeToXml(writer,
                (QuickGraph.VertexIdentity<ExperimentNode>)(v => v.ID),
                (QuickGraph.EdgeIdentity<ExperimentNode, ExperimentNodeConnection>)(e => e.ID),
                "graph", "node", "edge", "",
                factory.WriteGraphAttributes,
                factory.WriteNodeAttributes,
                factory.WriteEdgeAttributes);
        }
        /// <summary>
        /// Serializes the experiment.
        /// </summary>
        /// <param name="experiment">The experiment to be serialized.</param>
        /// <param name="writer">The writer.</param>
        /// <param name="library">The library.</param>
        /// <param name="workspaceTypeDirectories">The workspace type directories.</param>
        /// <param name="dataRoot">The data root.</param>
        public void SerializeExperiment(IExperiment experiment, TLExperimentResults baseline, XmlWriter writer)
        {
            //use standard factory to serialize the experiment
            var factory = new BenchmarkExperimentFactory(baseline);

            experiment.SerializeToXml(writer,
                (QuickGraph.VertexIdentity<ExperimentNode>)(v => v.ID),
                (QuickGraph.EdgeIdentity<ExperimentNode, ExperimentNodeConnection>)(e => e.ID),
                "graph", "node", "edge", "",
                factory.WriteGraphAttributes,
                factory.WriteNodeAttributes,
                factory.WriteEdgeAttributes);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Serializes the experiment.
        /// </summary>
        /// <param name="experiment">The experiment to be serialized.</param>
        /// <param name="writer">The writer.</param>
        /// <param name="library">The library.</param>
        /// <param name="workspaceTypeDirectories">The workspace type directories.</param>
        /// <param name="dataRoot">The data root.</param>
        public void SerializeExperiment(IExperiment experiment, TLExperimentResults baseline, XmlWriter writer)
        {
            //use standard factory to serialize the experiment
            var factory = new BenchmarkExperimentFactory(baseline);

            experiment.SerializeToXml(writer,
                                      (QuickGraph.VertexIdentity <ExperimentNode>)(v => v.ID),
                                      (QuickGraph.EdgeIdentity <ExperimentNode, ExperimentNodeConnection>)(e => e.ID),
                                      "graph", "node", "edge", "",
                                      factory.WriteGraphAttributes,
                                      factory.WriteNodeAttributes,
                                      factory.WriteEdgeAttributes);
        }