public static PropertyTreeReader Create(string fileName, Encoding encoding = null, PropertyTreeReaderSettings settings = null) { if (fileName == null) { throw new ArgumentNullException("fileName"); } if (string.IsNullOrEmpty(fileName)) { throw Failure.EmptyString("fileName"); } return(GetFactoryFunc(fileName)(StreamContext.FromFile(fileName), encoding, settings)); }
public static PropertyTreeReader Create(StreamContext streamContext, Encoding encoding = null, PropertyTreeReaderSettings settings = null) { if (streamContext == null) { throw new ArgumentNullException("streamContext"); // $NON-NLS-1 } string lp = string.Empty; if (streamContext.Uri.IsAbsoluteUri) { lp = streamContext.Uri.LocalPath; } var result = GetFactoryFunc(lp)(streamContext, encoding, settings); return(result); }