本文整理汇总了C#中CsdlSemanticsSchema.WrapLabeledElement方法的典型用法代码示例。如果您正苦于以下问题:C# CsdlSemanticsSchema.WrapLabeledElement方法的具体用法?C# CsdlSemanticsSchema.WrapLabeledElement怎么用?C# CsdlSemanticsSchema.WrapLabeledElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CsdlSemanticsSchema
的用法示例。
在下文中一共展示了CsdlSemanticsSchema.WrapLabeledElement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WrapExpression
internal static IEdmExpression WrapExpression(CsdlExpressionBase expression, IEdmEntityType bindingContext, CsdlSemanticsSchema schema)
{
if (expression != null)
{
switch (expression.ExpressionKind)
{
case EdmExpressionKind.Cast:
return new CsdlSemanticsCastExpression((CsdlCastExpression)expression, bindingContext, schema);
case EdmExpressionKind.BinaryConstant:
return new CsdlSemanticsBinaryConstantExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.BooleanConstant:
return new CsdlSemanticsBooleanConstantExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.Collection:
return new CsdlSemanticsCollectionExpression((CsdlCollectionExpression)expression, bindingContext, schema);
case EdmExpressionKind.DateTimeOffsetConstant:
return new CsdlSemanticsDateTimeOffsetConstantExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.DecimalConstant:
return new CsdlSemanticsDecimalConstantExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.EntitySetReference:
return new CsdlSemanticsEntitySetReferenceExpression((CsdlEntitySetReferenceExpression)expression, bindingContext, schema);
case EdmExpressionKind.EnumMember:
case EdmExpressionKind.EnumMemberReference:
return new CsdlSemanticsEnumMemberExpression((CsdlEnumMemberExpression)expression, bindingContext, schema);
case EdmExpressionKind.FloatingConstant:
return new CsdlSemanticsFloatingConstantExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.Null:
return new CsdlSemanticsNullExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.OperationApplication:
return new CsdlSemanticsApplyExpression((CsdlApplyExpression)expression, bindingContext, schema);
case EdmExpressionKind.OperationReference:
return new CsdlSemanticsOperationReferenceExpression((CsdlOperationReferenceExpression)expression, bindingContext, schema);
case EdmExpressionKind.GuidConstant:
return new CsdlSemanticsGuidConstantExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.If:
return new CsdlSemanticsIfExpression((CsdlIfExpression)expression, bindingContext, schema);
case EdmExpressionKind.IntegerConstant:
return new CsdlSemanticsIntConstantExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.IsType:
return new CsdlSemanticsIsTypeExpression((CsdlIsTypeExpression)expression, bindingContext, schema);
case EdmExpressionKind.LabeledExpressionReference:
return new CsdlSemanticsLabeledExpressionReferenceExpression((CsdlLabeledExpressionReferenceExpression)expression, bindingContext, schema);
case EdmExpressionKind.Labeled:
return schema.WrapLabeledElement((CsdlLabeledExpression)expression, bindingContext);
case EdmExpressionKind.ParameterReference:
return new CsdlSemanticsParameterReferenceExpression((CsdlParameterReferenceExpression)expression, bindingContext, schema);
case EdmExpressionKind.Path:
return new CsdlSemanticsPathExpression((CsdlPathExpression)expression, bindingContext, schema);
case EdmExpressionKind.PropertyPath:
return new CsdlSemanticsPropertyPathExpression((CsdlPropertyPathExpression)expression, bindingContext, schema);
case EdmExpressionKind.NavigationPropertyPath:
return new CsdlSemanticsNavigationPropertyPathExpression((CsdlNavigationPropertyPathExpression)expression, bindingContext, schema);
case EdmExpressionKind.PropertyReference:
return new CsdlSemanticsPropertyReferenceExpression((CsdlPropertyReferenceExpression)expression, bindingContext, schema);
case EdmExpressionKind.Record:
return new CsdlSemanticsRecordExpression((CsdlRecordExpression)expression, bindingContext, schema);
case EdmExpressionKind.StringConstant:
return new CsdlSemanticsStringConstantExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.DurationConstant:
return new CsdlSemanticsDurationConstantExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.DateConstant:
return new CsdlSemanticsDateConstantExpression((CsdlConstantExpression)expression, schema);
case EdmExpressionKind.TimeOfDayConstant:
return new CsdlSemanticsTimeOfDayConstantExpression((CsdlConstantExpression)expression, schema);
}
}
return null;
}