本文整理汇总了C#中MemberPath.PathToString方法的典型用法代码示例。如果您正苦于以下问题:C# MemberPath.PathToString方法的具体用法?C# MemberPath.PathToString怎么用?C# MemberPath.PathToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemberPath
的用法示例。
在下文中一共展示了MemberPath.PathToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDefaultValueForMemberPath
internal static Constant GetDefaultValueForMemberPath(MemberPath memberPath, IEnumerable<LeftCellWrapper> wrappersForErrorReporting,
ConfigViewGenerator config)
{
Constant defaultValue = null;
if (!Domain.TryGetDefaultValueForMemberPath(memberPath, out defaultValue))
{
string message = Strings.ViewGen_No_Default_Value(memberPath.Extent.Name, memberPath.PathToString(false));
ErrorLog.Record record = new ErrorLog.Record(true, ViewGenErrorCode.NoDefaultValue, message, wrappersForErrorReporting, String.Empty);
ExceptionHelpers.ThrowMappingException(record, config);
}
return defaultValue;
}
示例2: AddElseDefaultToCaseStatement
private void AddElseDefaultToCaseStatement(
MemberPath currentPath, CaseStatement caseStatement, List<Constant> domain,
CellTreeNode rightDomainQuery, Tile<FragmentQuery> unionCaseRewriting)
{
Debug.Assert(_context.ViewTarget == ViewTarget.UpdateView, "Used for update views only");
Constant defaultValue;
var hasDefaultValue = Domain.TryGetDefaultValueForMemberPath(currentPath, out defaultValue);
if (false == hasDefaultValue
|| false == domain.Contains(defaultValue))
{
Debug.Assert(unionCaseRewriting != null, "No union of rewritings for case statements");
var unionTree = TileToCellTree(unionCaseRewriting, _context);
var configurationNeedsDefault = _context.RightFragmentQP.Difference(
rightDomainQuery.RightFragmentQuery, unionTree.RightFragmentQuery);
if (_context.RightFragmentQP.IsSatisfiable(configurationNeedsDefault))
{
if (hasDefaultValue)
{
caseStatement.AddWhenThen(BoolExpression.True, new ConstantProjectedSlot(defaultValue));
}
else
{
configurationNeedsDefault.Condition.ExpensiveSimplify();
var builder = new StringBuilder();
builder.AppendLine(
Strings.ViewGen_No_Default_Value_For_Configuration(currentPath.PathToString(false /* for alias */)));
_errorLog.AddEntry(
new ErrorLog.Record(
ViewGenErrorCode.NoDefaultValue, builder.ToString(), _context.AllWrappersForExtent, String.Empty));
}
}
}
}