示例#1
0
 public static T ReadPropertyTree <T>(this StreamContext streamContext, Type type, Encoding encoding = null, PropertyTreeReaderSettings settings = null)
 {
     using (var reader = PropertyTreeReader.Create(streamContext, encoding, settings)) {
         reader.Read();
         return(reader.Bind <T>());
     }
 }
示例#2
0
        public override object Load(StreamContext inputSource, Type instanceType)
        {
            if (inputSource == null)
            {
                throw new ArgumentNullException("inputSource");
            }
            var ptx = PropertyTreeReader.Create(inputSource);

            return(ptx.Bind(instanceType));
        }