Mercurial > pub > bltoolkit
comparison Source/Data/Linq/Builder/BuildInfo.cs @ 0:f990fcb411a9
Копия текущей версии из github
| author | cin |
|---|---|
| date | Thu, 27 Mar 2014 21:46:09 +0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:f990fcb411a9 |
|---|---|
| 1 using System; | |
| 2 using System.Linq.Expressions; | |
| 3 | |
| 4 namespace BLToolkit.Data.Linq.Builder | |
| 5 { | |
| 6 using Data.Sql; | |
| 7 | |
| 8 public class BuildInfo | |
| 9 { | |
| 10 public BuildInfo(IBuildContext parent, Expression expression, SqlQuery sqlQuery) | |
| 11 { | |
| 12 Parent = parent; | |
| 13 Expression = expression; | |
| 14 SqlQuery = sqlQuery; | |
| 15 } | |
| 16 | |
| 17 public BuildInfo(BuildInfo buildInfo, Expression expression) | |
| 18 : this(buildInfo.Parent, expression, buildInfo.SqlQuery) | |
| 19 { | |
| 20 SequenceInfo = buildInfo; | |
| 21 } | |
| 22 | |
| 23 public BuildInfo(BuildInfo buildInfo, Expression expression, SqlQuery sqlQuery) | |
| 24 : this(buildInfo.Parent, expression, sqlQuery) | |
| 25 { | |
| 26 SequenceInfo = buildInfo; | |
| 27 } | |
| 28 | |
| 29 public BuildInfo SequenceInfo { get; set; } | |
| 30 public IBuildContext Parent { get; set; } | |
| 31 public Expression Expression { get; set; } | |
| 32 public SqlQuery SqlQuery { get; set; } | |
| 33 public bool CopyTable { get; set; } | |
| 34 | |
| 35 public bool IsSubQuery { get { return Parent != null; } } | |
| 36 | |
| 37 private bool _isAssociationBuilt; | |
| 38 public bool IsAssociationBuilt | |
| 39 { | |
| 40 get { return _isAssociationBuilt; } | |
| 41 set | |
| 42 { | |
| 43 _isAssociationBuilt = value; | |
| 44 | |
| 45 if (SequenceInfo != null) | |
| 46 SequenceInfo.IsAssociationBuilt = value; | |
| 47 } | |
| 48 } | |
| 49 } | |
| 50 } |
