public bool TryGetParser <T>(out TypeParser <T> parser) { // Richard, if you need comment, see above, it's almost the same, just to fail operations so we don't throw if (DefaultLocator.TryGetParser(out parser)) { return(true); } if (TryLoadAssembly <T>()) { return(TryGetParser(out parser)); } return(false); }
// TODO : Should the circularschemareference throw here too? and not silently fail? public bool TryGetParser <T>(out TypeParser <T> parser) { parser = null; var nextProxy = new ParserDiscoveryProxy(this); var locateType = typeof(T); if (nextProxy.TraversedType.Add(locateType)) { return(CurrentParent.TryGetParser(nextProxy, out parser)); } if (ThrowOnCircular) { throw DetectedCircularException(locateType); } return(false); }