public SqlType Parse(IContext context, string s) { var typeInfo = PlSqlParser.ParseType(s); if (PrimitiveTypes.IsPrimitive(typeInfo.TypeName)) { return(PrimitiveTypes.Resolver.Resolve(typeInfo)); } if (context == null) { throw new Exception($"Type {typeInfo.TypeName} is not primitive and no context is provided"); } var resolver = context.Scope.Resolve <ISqlTypeResolver>(); if (resolver == null) { throw new InvalidOperationException($"The type {typeInfo.TypeName} is not primitive and no resolver was found in context"); } return(resolver.Resolve(typeInfo)); }