private ODataExpression(ODataSessionFactoryContext sessionFactoryContext, System.Type persistentClass, ODataParserConfiguration configuration) { Require.NotNull(sessionFactoryContext, "sessionFactoryContext"); Require.NotNull(persistentClass, "persistentClass"); Require.NotNull(configuration, "configuration"); _persistentClass = persistentClass; _configuration = configuration; _context = new CriterionBuildContext( sessionFactoryContext, configuration.CaseSensitive, configuration.CaseSensitiveLike, configuration.NameResolver ?? new NameResolver() ); _context.AliasesByName.Add(RootAlias, new Alias(RootAlias, string.Empty, _persistentClass)); if (persistentClass != null) { _context.PushLambdaContext("$it", _persistentClass, RootAlias); } _normalizeVisitor = new AliasingNormalizeVisitor(_context, persistentClass, RootAlias); _context.AddAliases(_normalizeVisitor.Aliases.Values); }
public AliasingNormalizeVisitor(CriterionBuildContext context, System.Type persistentClass, string rootAlias) { if (rootAlias != null && rootAlias.Length == 0) throw new ArgumentException("Root alias cannot be an empty string.", "rootAlias"); _context = context; _persistentClass = persistentClass; _rootAlias = rootAlias; Aliases = new Dictionary<string, Alias>(StringComparer.Ordinal); }
public AliasingNormalizeVisitor(CriterionBuildContext context, System.Type persistentClass, string rootAlias) { if (rootAlias != null && rootAlias.Length == 0) { throw new ArgumentException("Root alias cannot be an empty string.", "rootAlias"); } _context = context; _persistentClass = persistentClass; _rootAlias = rootAlias; Aliases = new Dictionary <string, Alias>(StringComparer.Ordinal); }
private ODataExpression(ODataSessionFactoryContext sessionFactoryContext, System.Type persistentClass, ODataParserConfiguration configuration) { Require.NotNull(sessionFactoryContext, "sessionFactoryContext"); Require.NotNull(persistentClass, "persistentClass"); Require.NotNull(configuration, "configuration"); _persistentClass = persistentClass; _configuration = configuration; _context = new CriterionBuildContext( sessionFactoryContext, configuration.CaseSensitive, configuration.CaseSensitiveLike, configuration.NameResolver ?? new NameResolver() ); _context.AliasesByName.Add(RootAlias, new Alias(RootAlias, string.Empty, _persistentClass)); if (persistentClass != null) _context.PushLambdaContext("$it", _persistentClass, RootAlias); _normalizeVisitor = new AliasingNormalizeVisitor(_context, persistentClass, RootAlias); _context.AddAliases(_normalizeVisitor.Aliases.Values); }
public CriterionMethodVisitor(CriterionBuildContext context) { Require.NotNull(context, "context"); _context = context; }