コード例 #1
0
 public virtual T readValue <T>()
 {
     if (typeof(IFormattedFileReadable).IsAssignableFrom(typeof(T)))
     {
         IFormattedFileReadable formattedFileReadable = Activator.CreateInstance <T>() as IFormattedFileReadable;
         formattedFileReadable.read(this);
         return((T)((object)formattedFileReadable));
     }
     return(KeyValueTableTypeReaderRegistry.read <T>(this));
 }
コード例 #2
0
 public virtual object readValue(Type type)
 {
     if (typeof(IFormattedFileReadable).IsAssignableFrom(type))
     {
         IFormattedFileReadable formattedFileReadable = Activator.CreateInstance(type) as IFormattedFileReadable;
         formattedFileReadable.read(this);
         return(formattedFileReadable);
     }
     return(KeyValueTableTypeReaderRegistry.read(this, type));
 }
コード例 #3
0
 public static void remove <T>()
 {
     KeyValueTableTypeReaderRegistry.remove(typeof(T));
 }
コード例 #4
0
 public static void add <T>(IFormattedTypeReader reader)
 {
     KeyValueTableTypeReaderRegistry.add(typeof(T), reader);
 }