6 types derived from Constant
System.Data.Entity (6)
System\Data\Mapping\ViewGeneration\Structures\Constant.cs (3)
133
private sealed class NullConstant :
Constant
201
private sealed class UndefinedConstant :
Constant
272
private sealed class AllOtherConstantsConstant :
Constant
System\Data\Mapping\ViewGeneration\Structures\NegatedConstant.cs (1)
24
internal sealed class NegatedConstant :
Constant
System\Data\Mapping\ViewGeneration\Structures\ScalarConstant.cs (1)
25
internal sealed class ScalarConstant :
Constant
System\Data\Mapping\ViewGeneration\Structures\TypeConstant.cs (1)
27
internal sealed class TypeConstant :
Constant
337 references to Constant
System.Data.Entity (337)
System\Data\Mapping\ViewGeneration\CellCreator.cs (4)
106
.Where(restriction => restriction.Domain.Values.Contains(
Constant
.NotNull))
479
Constant
conditionConstant = (true == conditionMap.IsNull.Value) ?
Constant
.Null :
Constant
.NotNull;
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQuery.cs (3)
119
internal static BoolExpression CreateMemberCondition(MemberPath path,
Constant
domainValue, MemberDomainMap domainMap)
179
foreach (
Constant
constant in oneOf.Domain.Values)
181
constHashCode ^=
Constant
.EqualityComparer.GetHashCode(constant);
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryKB.cs (9)
22
internal class FragmentQueryKB : KnowledgeBase<DomainConstraint<BoolLiteral,
Constant
>>
24
private BoolExpr<DomainConstraint<BoolLiteral,
Constant
>> _kbExpression = TrueExpr<DomainConstraint<BoolLiteral,
Constant
>>.Value;
26
internal override void AddFact(BoolExpr<DomainConstraint<BoolLiteral,
Constant
>> fact)
29
_kbExpression = new AndExpr<DomainConstraint<BoolLiteral,
Constant
>>(_kbExpression, fact);
31
internal BoolExpr<DomainConstraint<BoolLiteral,
Constant
>> KbExpression
184
List<
Constant
> childDomain = new List<
Constant
>(domainMap.GetDomain(childPath));
211
Domain typeDomain = new Domain(derivedTypes.Select(derivedType => (
Constant
)new TypeConstant(derivedType)), domainMap.GetDomain(currentPath));
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryProcessor.cs (12)
23
using BoolDomainConstraint = DomainConstraint<BoolLiteral,
Constant
>;
113
IEnumerable<DomainVariable<BoolLiteral,
Constant
>> variables = view.Condition.Variables;
114
foreach (DomainVariable<BoolLiteral,
Constant
> var in variables)
128
foreach (
Constant
value in conditionValues.Values)
131
DomainConstraint<BoolLiteral,
Constant
> constraint = new DomainConstraint<BoolLiteral,
Constant
>(var,
132
new Set<
Constant
>(new
Constant
[] { value },
Constant
.EqualityComparer));
135
new AndExpr<DomainConstraint<BoolLiteral,
Constant
>>(view.Condition.Tree,
136
new NotExpr<DomainConstraint<BoolLiteral,
Constant
>>(new TermExpr<DomainConstraint<BoolLiteral,
Constant
>>(constraint))));
System\Data\Mapping\ViewGeneration\QueryRewriting\QueryRewriter.cs (28)
207
private IEnumerable<
Constant
> GetDomain(MemberPath currentPath)
247
IEnumerable<
Constant
> oldDomain = _domainMap.GetDomain(currentPath);
248
Constant
defaultValue = oldDomain.FirstOrDefault(domainValue => IsDefaultValue(domainValue, currentPath));
254
Constant
negatedValue = oldDomain.FirstOrDefault(domainValue => domainValue is NegatedConstant);
265
private void RemoveUnusedValueFromStoreDomain(
Constant
domainValue, MemberPath currentPath)
285
Set<
Constant
> newDomain = new Set<
Constant
>(_domainMap.GetDomain(currentPath),
Constant
.EqualityComparer);
341
private bool AddRewritingToCaseStatement(Tile<FragmentQuery> rewriting, CaseStatement caseStatement, MemberPath currentPath,
Constant
domainValue)
391
foreach (
Constant
domainValue in GetDomain(currentPath))
393
if (domainValue ==
Constant
.Undefined)
506
List<
Constant
> domain = GetDomain(currentPath).ToList();
516
domain.Contains(
Constant
.Null,
Constant
.EqualityComparer) &&
517
domain.Contains(
Constant
.NotNull,
Constant
.EqualityComparer));
520
foreach (
Constant
domainValue in domain)
522
if (domainValue ==
Constant
.Undefined && _context.ViewTarget == ViewTarget.QueryView)
527
new ConstantProjectedSlot(
Constant
.Undefined, currentPath));
601
private void AddElseDefaultToCaseStatement(MemberPath currentPath, CaseStatement caseStatement, List<
Constant
> domain,
606
Constant
defaultValue;
680
Constant
defaultConstant;
788
Constant
typeConstant = new TypeConstant(memberPath.EdmType);
1116
private BoolExpression CreateMemberCondition(MemberPath path,
Constant
domainValue)
1121
private FragmentQuery CreateMemberConditionQuery(MemberPath currentPath,
Constant
domainValue)
1126
internal static FragmentQuery CreateMemberConditionQuery(MemberPath currentPath,
Constant
domainValue,
1147
private static IEnumerable<
Constant
> GetTypeConstants(IEnumerable<EdmType> types)
1233
private static bool IsDefaultValue(
Constant
domainValue, MemberPath path)
System\Data\Mapping\ViewGeneration\QueryRewriting\RewritingValidator.cs (30)
197
List<
Constant
> domain = new List<
Constant
>(_domainMap.GetDomain(column));
203
Constant
domainValue = domain[i];
226
Constant
lastDomainValue = domain[domain.Count - 1];
251
foreach (
Constant
domainValue in _domainMap.GetDomain(column))
284
Constant
constant, MemberPath member,
300
IEnumerable<
Constant
> possibleValues = memberMaps.QueryDomainMap.GetDomain(joinSlot.MemberPath);
303
Set<
Constant
> allowedValues = new Set<
Constant
>(
Constant
.EqualityComparer);
335
IEnumerable<
Constant
> possibleValues = memberMaps.QueryDomainMap.GetDomain(projectedSlot.MemberPath);
336
Set<
Constant
> allowedValues = new Set<
Constant
>(
Constant
.EqualityComparer);
337
allowedValues.Add(
Constant
.Null);
386
private class WhereClauseVisitor : Visitor<DomainConstraint<BoolLiteral,
Constant
>, CellTreeNode>
405
internal override CellTreeNode VisitAnd(AndExpr<DomainConstraint<BoolLiteral,
Constant
>> expression)
423
internal override CellTreeNode VisitTrue(TrueExpr<DomainConstraint<BoolLiteral,
Constant
>> expression)
428
internal override CellTreeNode VisitTerm(TermExpr<DomainConstraint<BoolLiteral,
Constant
>> expression)
431
Set<
Constant
> range = expression.Identifier.Range;
436
foreach (
Constant
value in range)
453
internal override CellTreeNode VisitFalse(FalseExpr<DomainConstraint<BoolLiteral,
Constant
>> expression)
457
internal override CellTreeNode VisitNot(NotExpr<DomainConstraint<BoolLiteral,
Constant
>> expression)
461
internal override CellTreeNode VisitOr(OrExpr<DomainConstraint<BoolLiteral,
Constant
>> expression)
466
private bool TryGetCellTreeNode(MemberPath memberPath,
Constant
value, out CellTreeNode singleNode)
471
private IEnumerable<CellTreeNode> AcceptChildren(IEnumerable<BoolExpr<DomainConstraint<BoolLiteral,
Constant
>>> children)
473
foreach (BoolExpr<DomainConstraint<BoolLiteral,
Constant
>> child in children) { yield return child.Accept(this); }
562
internal readonly
Constant
Value;
564
public MemberValueBinding(MemberPath member,
Constant
value)
580
Constant
.EqualityComparer.Equals(Value, other.Value);
System\Data\Mapping\ViewGeneration\Structures\BoolExpression.cs (14)
21
using BoolDomainConstraint = DomainConstraint<BoolLiteral,
Constant
>;
22
using DomainAndExpr = AndExpr<DomainConstraint<BoolLiteral,
Constant
>>;
23
using DomainBoolExpr = BoolExpr<DomainConstraint<BoolLiteral,
Constant
>>;
24
using DomainFalseExpr = FalseExpr<DomainConstraint<BoolLiteral,
Constant
>>;
25
using DomainNotExpr = NotExpr<DomainConstraint<BoolLiteral,
Constant
>>;
26
using DomainOrExpr = OrExpr<DomainConstraint<BoolLiteral,
Constant
>>;
27
using DomainTermExpr = TermExpr<DomainConstraint<BoolLiteral,
Constant
>>;
28
using DomainTrueExpr = TrueExpr<DomainConstraint<BoolLiteral,
Constant
>>;
198
DomainConstraint<BoolLiteral,
Constant
> domainConstraint = term.Identifier;
199
DomainVariable<BoolLiteral,
Constant
> variable = domainConstraint.Variable;
250
internal IEnumerable<DomainConstraint<BoolLiteral,
Constant
>> VariableConstraints
252
get { return LeafVisitor<DomainConstraint<BoolLiteral,
Constant
>>.GetLeaves(m_tree); }
255
internal IEnumerable<DomainVariable<BoolLiteral,
Constant
>> Variables
264
foreach (DomainVariable<BoolLiteral,
Constant
> var in Variables)
System\Data\Mapping\ViewGeneration\Structures\BoolExpressionVisitors.cs (9)
21
using BoolDomainConstraint = DomainConstraint<BoolLiteral,
Constant
>;
22
using DomainAndExpr = AndExpr<DomainConstraint<BoolLiteral,
Constant
>>;
23
using DomainBoolExpr = BoolExpr<DomainConstraint<BoolLiteral,
Constant
>>;
24
using DomainFalseExpr = FalseExpr<DomainConstraint<BoolLiteral,
Constant
>>;
25
using DomainNotExpr = NotExpr<DomainConstraint<BoolLiteral,
Constant
>>;
26
using DomainOrExpr = OrExpr<DomainConstraint<BoolLiteral,
Constant
>>;
27
using DomainTermExpr = TermExpr<DomainConstraint<BoolLiteral,
Constant
>>;
28
using DomainTreeExpr = TreeExpr<DomainConstraint<BoolLiteral,
Constant
>>;
29
using DomainTrueExpr = TrueExpr<DomainConstraint<BoolLiteral,
Constant
>>;
System\Data\Mapping\ViewGeneration\Structures\BoolLiteral.cs (27)
19
using DomainConstraint = System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral,
Constant
>;
20
using DomainVariable = System.Data.Common.Utils.Boolean.DomainVariable<BoolLiteral,
Constant
>;
21
using DomainBoolExpr = System.Data.Common.Utils.Boolean.BoolExpr<System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral,
Constant
>>;
22
using DomainNotExpr = System.Data.Common.Utils.Boolean.NotExpr <System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral,
Constant
>>;
23
using DomainTermExpr = System.Data.Common.Utils.Boolean.TermExpr<System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral,
Constant
>>;
41
internal static DomainTermExpr MakeTermExpression(BoolLiteral literal, IEnumerable<
Constant
> domain, IEnumerable<
Constant
> range)
43
Set<
Constant
> domainSet = new Set<
Constant
>(domain,
Constant
.EqualityComparer);
44
Set<
Constant
> rangeSet = new Set<
Constant
>(range,
Constant
.EqualityComparer);
51
internal static DomainTermExpr MakeTermExpression(BoolLiteral literal, Set<
Constant
> domain, Set<
Constant
> range)
67
internal abstract DomainBoolExpr FixRange(Set<
Constant
> range, MemberDomainMap memberDomainMap);
182
IEnumerable<
Constant
> actualValues = new
Constant
[] { new ScalarConstant(true) };
183
IEnumerable<
Constant
> possibleValues = new
Constant
[] { new ScalarConstant(true), new ScalarConstant(false) };
184
Set<
Constant
> variableDomain = new Set<
Constant
>(possibleValues,
Constant
.EqualityComparer).MakeReadOnly();
185
Set<
Constant
> thisDomain = new Set<
Constant
>(actualValues,
Constant
.EqualityComparer).MakeReadOnly();
191
internal override DomainBoolExpr FixRange(Set<
Constant
> range, MemberDomainMap memberDomainMap)
System\Data\Mapping\ViewGeneration\Structures\CaseStatement.cs (2)
208
m_elseValue = new ConstantProjectedSlot(
Constant
.Null, m_memberPath);
276
Constant
.Null.AsCqt(row, this.MemberPath);
System\Data\Mapping\ViewGeneration\Structures\CellQuery.cs (4)
680
IEnumerable<
Constant
> possibleValues = domainMap.GetDomain(restriction.RestrictedMemberSlot.MemberPath);
690
!scalarConst.Domain.Contains(
Constant
.Null) &&
691
!scalarConst.Domain.Contains(
Constant
.NotNull) &&
692
!scalarConst.Domain.Contains(
Constant
.Undefined);
System\Data\Mapping\ViewGeneration\Structures\Constant.cs (21)
27
internal static readonly IEqualityComparer<
Constant
> EqualityComparer = new CellConstantComparer();
28
internal static readonly
Constant
Null = NullConstant.Instance;
29
internal static readonly
Constant
NotNull = new NegatedConstant( new
Constant
[] { NullConstant.Instance });
30
internal static readonly
Constant
Undefined = UndefinedConstant.Instance;
35
internal static readonly
Constant
AllOtherConstants = AllOtherConstantsConstant.Instance;
66
Constant
cellConst = obj as
Constant
;
82
protected abstract bool IsEqualTo(
Constant
right);
87
internal static void ConstantsToUserString(StringBuilder builder, Set<
Constant
> constants)
90
foreach (
Constant
constant in constants)
104
private class CellConstantComparer : IEqualityComparer<
Constant
>
106
public bool Equals(
Constant
left,
Constant
right)
124
public int GetHashCode(
Constant
key)
135
internal static readonly
Constant
Instance = new NullConstant();
184
protected override bool IsEqualTo(
Constant
right)
203
internal static readonly
Constant
Instance = new UndefinedConstant();
251
protected override bool IsEqualTo(
Constant
right)
274
internal static readonly
Constant
Instance = new AllOtherConstantsConstant();
322
protected override bool IsEqualTo(
Constant
right)
System\Data\Mapping\ViewGeneration\Structures\ConstantProjectedSlot.cs (5)
28
internal ConstantProjectedSlot(
Constant
value, MemberPath memberPath)
41
private readonly
Constant
m_constant;
49
internal
Constant
CellConstant
79
return
Constant
.EqualityComparer.Equals(m_constant, rightSlot.m_constant);
84
return
Constant
.EqualityComparer.GetHashCode(m_constant);
System\Data\Mapping\ViewGeneration\Structures\Domain.cs (55)
21
using CellConstantSet = Set<
Constant
>;
35
internal Domain(
Constant
value, IEnumerable<
Constant
> possibleDiscreteValues) :
36
this(new
Constant
[] { value }, possibleDiscreteValues)
42
internal Domain(IEnumerable<
Constant
> values,
43
IEnumerable<
Constant
> possibleDiscreteValues)
70
m_domain = new Set<
Constant
>(domain.m_domain,
Constant
.EqualityComparer);
71
m_possibleValues = new Set<
Constant
>(domain.m_possibleValues,
Constant
.EqualityComparer);
86
internal IEnumerable<
Constant
> AllPossibleValues
92
private Set<
Constant
> AllPossibleValuesInternal
97
return m_possibleValues.Union(new
Constant
[] { negatedPossibleValue });
110
internal IEnumerable<
Constant
> Values
123
domain.Add(
Constant
.Null);
142
domain = new Set<
Constant
>(CreateList(true, false),
Constant
.EqualityComparer);
147
domain = new Set<
Constant
>(
Constant
.EqualityComparer);
150
domain.Add(
Constant
.NotNull);
164
List<
Constant
> types = new List<
Constant
>();
170
domain = new Set<
Constant
>(types,
Constant
.EqualityComparer);
181
internal static bool TryGetDefaultValueForMemberPath(MemberPath memberPath, out
Constant
defaultConstant)
184
defaultConstant =
Constant
.Null;
197
internal static
Constant
GetDefaultValueForMemberPath(MemberPath memberPath, IEnumerable<LeftCellWrapper> wrappersForErrorReporting,
200
Constant
defaultValue = null;
216
foreach (
Constant
constant in m_domain)
218
result ^=
Constant
.EqualityComparer.GetHashCode(constant);
236
return negated != null && negated.Contains(
Constant
.Null);
242
internal bool Contains(
Constant
constant)
253
internal static CellConstantSet ExpandNegationsInDomain(IEnumerable<
Constant
> domain, IEnumerable<
Constant
> otherPossibleValues)
267
CellConstantSet result = new Set<
Constant
>(
Constant
.EqualityComparer);
269
foreach (
Constant
constant in domain)
290
internal static CellConstantSet ExpandNegationsInDomain(IEnumerable<
Constant
> domain)
298
static CellConstantSet DeterminePossibleValues(IEnumerable<
Constant
> domain)
306
CellConstantSet result = new CellConstantSet(
Constant
.EqualityComparer);
308
foreach (
Constant
constant in domain)
318
foreach (
Constant
constElement in negated.Elements)
356
cDomain.AddRange(restriction.Domain.Values.Where(c => !(c.Equals(
Constant
.Null) || c.Equals(
Constant
.NotNull))));
438
Constant
defaultValue;
465
private static bool TryGetDomainRestrictedByWhereClause(IEnumerable<
Constant
> domain, MemberProjectedSlot slot, CellQuery cellQuery, out CellConstantSet result)
470
.Select(restriction => new CellConstantSet(restriction.Domain.Values,
Constant
.EqualityComparer));
493
result = new CellConstantSet(restrictedDomain.Values,
Constant
.EqualityComparer);
512
private static NegatedConstant GetNegatedConstant(IEnumerable<
Constant
> constants)
515
foreach (
Constant
constant in constants)
529
private static CellConstantSet DeterminePossibleValues(IEnumerable<
Constant
> domain1, IEnumerable<
Constant
> domain2)
531
CellConstantSet union = new CellConstantSet(domain1,
Constant
.EqualityComparer).Union(domain2);
550
private static IEnumerable<
Constant
> CreateList(object value1, object value2)
577
foreach (
Constant
constant in m_domain)
System\Data\Mapping\ViewGeneration\Structures\MemberDomainMap.cs (23)
19
using CellConstantSet = Common.Utils.Set<
Constant
>;
101
if (!domainValues.Contains(
Constant
.Null))
105
if (condition.Domain.Values.All(conditionConstant => (conditionConstant.Equals(
Constant
.NotNull))))
120
if (domainValues.Count <= 0 || (!domainValues.Contains(
Constant
.Null) && condition.Domain.Values.Contains(
Constant
.Null)))
128
domainValues.Add(
Constant
.Undefined);
150
memberSet.Add(
Constant
.Undefined);
175
var domainMap = m_conditionDomainMap.ToDictionary(p => p.Key, p => new Set<
Constant
>(p.Value,
Constant
.EqualityComparer));
184
var domainMap = m_conditionDomainMap.ToDictionary(p => p.Key, p => new Set<
Constant
>(p.Value,
Constant
.EqualityComparer));
211
Set<
Constant
> completeDomain = Domain.DeriveDomainFromMemberPath(path, m_edmItemCollection, true /* leaveDomainUnbounded */);
247
extra.Remove(
Constant
.Undefined);
302
private static void ExpandNegationsInDomainMap(Dictionary<MemberPath, Set<
Constant
>> domainMap)
345
set.Add(
Constant
.AllOtherConstants);
354
set.Remove(
Constant
.AllOtherConstants);
359
internal IEnumerable<
Constant
> GetDomain(MemberPath path)
376
internal void UpdateConditionMemberDomain(MemberPath path, IEnumerable<
Constant
> domainValues)
379
Set<
Constant
> oldDomain = m_conditionDomainMap[path];
386
private void AddToDomainMap(MemberPath member, IEnumerable<
Constant
> domainValues)
391
possibleValues = new CellConstantSet(
Constant
.EqualityComparer);
405
IEnumerable<
Constant
> domain = GetDomain(memberPath);
416
internal CellConstantSetInfo(Set<
Constant
> iconstants, MemberProjectedSlot islot)
System\Data\Mapping\ViewGeneration\Structures\MemberRestriction.cs (19)
20
using DomainBoolExpr = System.Data.Common.Utils.Boolean.BoolExpr<System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral,
Constant
>>;
21
using DomainTermExpr = System.Data.Common.Utils.Boolean.TermExpr<System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral,
Constant
>>;
36
protected MemberRestriction(MemberProjectedSlot slot,
Constant
value)
37
: this(slot, new
Constant
[] { value })
43
protected MemberRestriction(MemberProjectedSlot slot, IEnumerable<
Constant
> values)
65
protected MemberRestriction(MemberProjectedSlot slot, IEnumerable<
Constant
> values, IEnumerable<
Constant
> possibleValues)
114
IEnumerable<
Constant
> domain = domainMap.GetDomain(m_restrictedMemberSlot.MemberPath);
127
internal abstract MemberRestriction CreateCompleteMemberRestriction(IEnumerable<
Constant
> possibleValues);
209
foreach (
Constant
constant in Domain.Values)
218
Set<
Constant
> constants;
225
constants = new Set<
Constant
>(negatedConstant.Elements,
Constant
.EqualityComparer);
226
foreach (
Constant
constant in Domain.Values)
237
constants = new Set<
Constant
>(Domain.Values,
Constant
.EqualityComparer);
281
Constant
.ConstantsToUserString(constantBuilder, constants);
310
private void InvertOutputStringForTypeConstant(StringBuilder builder, Set<
Constant
> constants, MetadataWorkspace workspace)
326
foreach (
Constant
constant in constants)
System\Data\Mapping\ViewGeneration\Structures\NegatedConstant.cs (27)
31
internal NegatedConstant(IEnumerable<
Constant
> values)
34
m_negatedDomain = new Set<
Constant
>(values,
Constant
.EqualityComparer);
42
private readonly Set<
Constant
> m_negatedDomain;
46
internal IEnumerable<
Constant
> Elements
56
internal bool Contains(
Constant
constant)
68
if (object.ReferenceEquals(this,
Constant
.NotNull))
74
return m_negatedDomain.Count == 1 && m_negatedDomain.Contains(
Constant
.Null);
84
/// Returns true if the negated constant contains <see cref="
Constant
.Null"/>.
88
return m_negatedDomain.Contains(
Constant
.Null);
94
foreach (
Constant
constant in m_negatedDomain)
96
result ^=
Constant
.EqualityComparer.GetHashCode(constant);
101
protected override bool IsEqualTo(
Constant
right)
130
internal StringBuilder AsEsql(StringBuilder builder, string blockAlias, IEnumerable<
Constant
> constants, MemberPath outputMember, bool skipIsNotNull)
135
internal DbExpression AsCqt(DbExpression row, IEnumerable<
Constant
> constants, MemberPath outputMember, bool skipIsNotNull)
162
internal StringBuilder AsUserString(StringBuilder builder, string blockAlias, IEnumerable<
Constant
> constants, MemberPath outputMember, bool skipIsNotNull)
173
private void AsCql(Action trueLiteral, Action varIsNotNull, Action<
Constant
> varNotEqualsTo, IEnumerable<
Constant
> constants, MemberPath outputMember, bool skipIsNotNull)
177
Set<
Constant
> negatedConstants = new Set<
Constant
>(this.Elements,
Constant
.EqualityComparer);
178
foreach (
Constant
constant in constants)
192
bool hasNull = negatedConstants.Contains(
Constant
.Null);
193
negatedConstants.Remove(
Constant
.Null);
203
foreach (
Constant
constant in negatedConstants)
210
private StringBuilder ToStringHelper(StringBuilder builder, string blockAlias, IEnumerable<
Constant
> constants, MemberPath outputMember, bool skipIsNotNull, bool userString)
267
foreach (
Constant
constant in m_negatedDomain)
System\Data\Mapping\ViewGeneration\Structures\OpCellTreeNode.cs (2)
256
new ConstantProjectedSlot(
Constant
.Null, memberPath), memberPath);
288
new ConstantProjectedSlot(
Constant
.Null, slotInfo.OutputMember), slotInfo.OutputMember);
System\Data\Mapping\ViewGeneration\Structures\ScalarConstant.cs (1)
146
protected override bool IsEqualTo(
Constant
right)
System\Data\Mapping\ViewGeneration\Structures\ScalarRestriction.cs (17)
21
using DomainBoolExpr = System.Data.Common.Utils.Boolean.BoolExpr<System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral,
Constant
>>;
34
internal ScalarRestriction(MemberPath member,
Constant
value)
43
internal ScalarRestriction(MemberPath member, IEnumerable<
Constant
> values, IEnumerable<
Constant
> possibleValues)
60
internal override DomainBoolExpr FixRange(Set<
Constant
> range, MemberDomainMap memberDomainMap)
63
IEnumerable<
Constant
> newPossibleValues = memberDomainMap.GetDomain(RestrictedMemberSlot.MemberPath);
74
internal override MemberRestriction CreateCompleteMemberRestriction(IEnumerable<
Constant
> possibleValues)
183
foreach (
Constant
constant in domainValues)
260
Action<NegatedConstant, IEnumerable<
Constant
>> negatedConstantAsCql,
261
Action<Set<
Constant
>> varInDomain,
288
Set<
Constant
> domainValues = new Set<
Constant
>(this.Domain.Values,
Constant
.EqualityComparer);
291
if (domainValues.Contains(
Constant
.Null))
294
domainValues.Remove(
Constant
.Null);
299
if (domainValues.Contains(
Constant
.Undefined))
302
domainValues.Remove(
Constant
.Undefined);
System\Data\Mapping\ViewGeneration\Structures\TypeConstant.cs (1)
78
protected override bool IsEqualTo(
Constant
right)
System\Data\Mapping\ViewGeneration\Structures\TypeRestriction.cs (9)
22
using DomainBoolExpr = System.Data.Common.Utils.Boolean.BoolExpr<System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral,
Constant
>>;
41
internal TypeRestriction(MemberPath member,
Constant
value)
59
internal override DomainBoolExpr FixRange(Set<
Constant
> range, MemberDomainMap memberDomainMap)
62
IEnumerable<
Constant
> possibleValues = memberDomainMap.GetDomain(RestrictedMemberSlot.MemberPath);
73
internal override MemberRestriction CreateCompleteMemberRestriction(IEnumerable<
Constant
> possibleValues)
90
foreach (
Constant
constant in this.Domain.Values)
182
foreach (
Constant
constant in Domain.Values)
214
private static IEnumerable<
Constant
> CreateTypeConstants(IEnumerable<EdmType> types)
220
yield return
Constant
.Null;
System\Data\Mapping\ViewGeneration\Validation\ErrorPatternMatcher.cs (15)
23
using CompositeCondition = Dictionary<MemberPath, Set<
Constant
>>;
98
foreach (
var
cellConst in restriction.Domain.Values)
127
if (condition.Domain.Values.Contains(
Constant
.NotNull))
135
if (negatedConst.Elements.Contains(
Constant
.Null))
241
foreach (
var
element in condition.Domain.Values)
243
Set<
Constant
> values;
247
values = new Set<
Constant
>(
Constant
.EqualityComparer);
609
foreach (
var
cellConst in restriction.Domain.Values)
780
class ConditionComparer : IEqualityComparer<Dictionary<MemberPath, Set<
Constant
>>>
782
public bool Equals(Dictionary<MemberPath, Set<
Constant
>> one, Dictionary<MemberPath, Set<
Constant
>> two)
794
Set<
Constant
> constantsOfOne = one[member];
795
Set<
Constant
> constantsOfTwo = two[member];
805
public int GetHashCode(Dictionary<MemberPath, Set<
Constant
>> obj)