本文整理汇总了C#中IEdmOperation.Should方法的典型用法代码示例。如果您正苦于以下问题:C# IEdmOperation.Should方法的具体用法?C# IEdmOperation.Should怎么用?C# IEdmOperation.Should使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEdmOperation
的用法示例。
在下文中一共展示了IEdmOperation.Should方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EdmEntityType
public void FilterBoundOperationsWithSameTypeHierarchyToTypeClosestToBindingTypeShouldFilterReturnTypeClosestToTypeA()
{
EdmEntityType aType = new EdmEntityType("N", "A");
EdmEntityType bType = new EdmEntityType("N", "B", aType);
EdmEntityType cType = new EdmEntityType("N", "C", bType);
EdmAction action = new EdmAction("namespace", "action", null, true, null);
action.AddParameter("bindingParameter", new EdmEntityTypeReference(aType, false));
EdmAction action2 = new EdmAction("namespace", "action", null, true, null);
action2.AddParameter("bindingParameter", new EdmEntityTypeReference(bType, false));
var filteredResults = new IEdmOperation[] { action, action2 }.FilterBoundOperationsWithSameTypeHierarchyToTypeClosestToBindingType(cType).ToList();
filteredResults.Should().HaveCount(1);
filteredResults[0].Should().BeSameAs(action2);
}
示例2: FilterByFullNameShouldReturnOneActionsWithCorrectNamespace
public void FilterByFullNameShouldReturnOneActionsWithCorrectNamespace()
{
EdmAction action = new EdmAction("namespace", "action", null);
EdmAction action2 = new EdmAction("namespace2", "action", null);
var filteredResults = new IEdmOperation[] { action, action2 }.FilterByName(false, "namespace.action").ToList();
filteredResults.Should().HaveCount(1);
filteredResults[0].Should().Be(action);
}