public static string getConstant(TypeConstant constant)
 {
     try
     {
         return ConstantsLoader.constantValues[constant];
     }
     catch (KeyNotFoundException)
     {
         Debug.Log("Dictionary key not found.");
         return string.Empty;
     }
 }
 private void EnsureConfigurationIsFullyMapped(
     MemberPath currentPath,
     BoolExpression currentWhereClause,
     HashSet <FragmentQuery> outputUsedViews,
     ErrorLog errorLog)
 {
     foreach (Constant domainValue in this.GetDomain(currentPath))
     {
         if (domainValue != Constant.Undefined)
         {
             BoolExpression       memberCondition = this.CreateMemberCondition(currentPath, domainValue);
             BoolExpression       and             = BoolExpression.CreateAnd(currentWhereClause, memberCondition);
             Tile <FragmentQuery> rewriting;
             if (!this.FindRewritingAndUsedViews((IEnumerable <MemberPath>) this._keyAttributes, and, outputUsedViews, out rewriting))
             {
                 if (!ErrorPatternMatcher.FindMappingErrors(this._context, this._domainMap, this._errorLog))
                 {
                     StringBuilder  builder   = new StringBuilder();
                     string         str       = StringUtil.FormatInvariant("{0}", (object)this._extentPath);
                     BoolExpression condition = rewriting.Query.Condition;
                     condition.ExpensiveSimplify();
                     if (condition.RepresentsAllTypeConditions)
                     {
                         string viewGenExtent = Strings.ViewGen_Extent;
                         builder.AppendLine(Strings.ViewGen_Cannot_Recover_Types((object)viewGenExtent, (object)str));
                     }
                     else
                     {
                         string viewGenEntities = Strings.ViewGen_Entities;
                         builder.AppendLine(Strings.ViewGen_Cannot_Disambiguate_MultiConstant((object)viewGenEntities, (object)str));
                     }
                     RewritingValidator.EntityConfigurationToUserString(condition, builder);
                     ErrorLog.Record record = new ErrorLog.Record(ViewGenErrorCode.AmbiguousMultiConstants, builder.ToString(), (IEnumerable <LeftCellWrapper>) this._context.AllWrappersForExtent, string.Empty);
                     errorLog.AddEntry(record);
                 }
             }
             else
             {
                 TypeConstant typeConstant = domainValue as TypeConstant;
                 if (typeConstant != null)
                 {
                     EdmType                  edmType = typeConstant.EdmType;
                     List <MemberPath>        list    = QueryRewriter.GetNonConditionalScalarMembers(edmType, currentPath, this._domainMap).Union <MemberPath>(QueryRewriter.GetNonConditionalComplexMembers(edmType, currentPath, this._domainMap)).ToList <MemberPath>();
                     IEnumerable <MemberPath> notCoveredAttributes;
                     if (list.Count > 0 && !this.FindRewritingAndUsedViews((IEnumerable <MemberPath>)list, and, outputUsedViews, out rewriting, out notCoveredAttributes))
                     {
                         List <MemberPath> memberPathList = new List <MemberPath>(list.Where <MemberPath>((Func <MemberPath, bool>)(a => !a.IsPartOfKey)));
                         this.AddUnrecoverableAttributesError(notCoveredAttributes, memberCondition, errorLog);
                     }
                     else
                     {
                         foreach (MemberPath conditionalComplexMember in QueryRewriter.GetConditionalComplexMembers(edmType, currentPath, this._domainMap))
                         {
                             this.EnsureConfigurationIsFullyMapped(conditionalComplexMember, and, outputUsedViews, errorLog);
                         }
                         foreach (MemberPath conditionalScalarMember in QueryRewriter.GetConditionalScalarMembers(edmType, currentPath, this._domainMap))
                         {
                             this.EnsureConfigurationIsFullyMapped(conditionalScalarMember, and, outputUsedViews, errorLog);
                         }
                     }
                 }
             }
         }
     }
 }