/// <summary> /// Creates a graph from the specified byte array. /// </summary> /// <param name="buffer">The buffer to read the <see cref="NetworkGraph"/> from.</param> /// <returns>The <see cref="NetworkGraph"/> this method creates.</returns> public static NetworkGraph FromMemory(byte[] buffer) { return(NetworkGraph.FromString(UTF8Encoding.UTF8.GetString(buffer))); }
/// <summary> /// Creates a graph from the specified file. /// </summary> /// <param name="fileName">A string that contains the name of the file from which to create the <see cref="NetworkGraph"/>.</param> /// <returns>The <see cref="NetworkGraph"/> this method creates.</returns> public static NetworkGraph FromFile(string fileName) { return(NetworkGraph.FromString(File.ReadAllText(fileName, Encoding.UTF8))); }