CollectionExtensions.GetRuntimeGroup(IEnumerable<RuntimeAssetGroup>, String) 方法

定义

获取其中 Runtimeruntime 匹配的第一个 RuntimeAssetGroupGets the first RuntimeAssetGroup where Runtime matches runtime.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyModel::RuntimeAssetGroup ^ GetRuntimeGroup(System::Collections::Generic::IEnumerable<Microsoft::Extensions::DependencyModel::RuntimeAssetGroup ^> ^ self, System::String ^ runtime);
public static Microsoft.Extensions.DependencyModel.RuntimeAssetGroup GetRuntimeGroup (this System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> self, string runtime);
static member GetRuntimeGroup : seq<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> * string -> Microsoft.Extensions.DependencyModel.RuntimeAssetGroup
<Extension()>
Public Function GetRuntimeGroup (self As IEnumerable(Of RuntimeAssetGroup), runtime As String) As RuntimeAssetGroup

参数

self
IEnumerable<RuntimeAssetGroup>

RuntimeAssetGroup 的源枚举。The source enumeration of RuntimeAssetGroup.

runtime
String

要搜索的字符串。The string to search for.

返回

RuntimeAssetGroup

其中 Runtimeruntime 匹配的第一个 RuntimeAssetGroup,或者,如果不存在,则为 nullThe first RuntimeAssetGroup where Runtime matches runtime, or null if none exists.

例外

runtimenull 或为空时引发。Thrown when runtime is null or empty.

适用于