Inheritance: IDisposable
示例#1
0
 /// <summary>
 /// Reads the specified reader.
 /// </summary>
 /// <param name="reader">The reader.</param>
 /// <returns>System.Object.</returns>
 public abstract object Read(JsonReader reader);
示例#2
0
文件: Matrix.cs 项目: sethjuarez/numl
 /// <summary>Loads the given stream.</summary>
 /// <exception cref="InvalidOperationException">Thrown when the requested file is not present.</exception>
 /// <param name="file">The file to load.</param>
 /// <returns>A Matrix.</returns>
 public static Matrix Load(string file)
 {
     if (File.Exists(file))
     {
         using (var fs = new FileStream(file, FileMode.Open))
         using (var f = new StreamReader(fs))
         using (var r = new JsonReader(f))
             return r.ReadMatrix();
     }
     else
         throw new InvalidOperationException("File not found");
 }
示例#3
0
 /// <summary>
 /// Reads the closing content.
 /// </summary>
 /// <param name="reader"></param>
 public void PostRead(JsonReader reader)
 {
     reader.ReadEndObject();
 }