Пример #1
0
        public static void LoadGraphml(this IGraph graph, string directory)
        {
            if (graph == null)
            {
                throw new ArgumentNullException(nameof(graph));
            }

            GraphMlReader.InputGraph(graph, string.Concat(directory, GraphFileGraphml));
        }
Пример #2
0
        internal static async Task <TinkerGrapĥ> ReadGraphMl(string filepath)
        {
            var filenames = await GetGraphFileNames();

            if (filepath == String.Empty || !filenames.Any(f => filepath.Contains(f)))
            {
                return(null);
            }

            using (StreamReader streamReader = new StreamReader(filepath))
            {
                TinkerGrapĥ g = new TinkerGrapĥ();
                GraphMlReader.InputGraph(g, streamReader.BaseStream);
                return(g);
            }
        }
 public override void LoadGraphData(TinkerGrapĥ tinkerGrapĥ, string directory)
 {
     GraphMlReader.InputGraph(tinkerGrapĥ, string.Concat(directory, GraphFileGraphml));
 }