ModelService.FromName Method

Definition

Locates the ModelItem in the given scope with the given name.

Overloads

FromName(ModelItem, String)

Locates the ModelItem in the given scope with the given name.

FromName(ModelItem, String, StringComparison)

Locates the ModelItem in the given scope with the given name.

Remarks

Returns null if the model item could not be located.

FromName(ModelItem, String)

Locates the ModelItem in the given scope with the given name.

C#
public System.Activities.Presentation.Model.ModelItem FromName(System.Activities.Presentation.Model.ModelItem scope, string name);

Parameters

scope
ModelItem

An optional scope to provide. If the scope is not provided, Root will be used as a scope. If the scope is provided, the nearest INameScope in the hierarchy will be used to locate the item.

name
String

The name to locate.

Returns

A ModelItem whose name matches name, or null if no match was found.

Exceptions

name is null.

Applies to

.NET Framework 4.8.1 및 기타 버전
제품 버전
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

FromName(ModelItem, String, StringComparison)

Locates the ModelItem in the given scope with the given name.

C#
public abstract System.Activities.Presentation.Model.ModelItem FromName(System.Activities.Presentation.Model.ModelItem scope, string name, StringComparison comparison);

Parameters

scope
ModelItem

An optional scope to provide. If the scope is not provided, Root will be used as a scope. If the scope is provided, the nearest INameScope in the hierarchy will be used to locate the item.

name
String

The name to locate.

comparison
StringComparison

Determines how the name should be compared. The default is to compare against ordinal.

Returns

A ModelItem whose name matches name, or null if no match was found.

Exceptions

name is null.

Applies to

.NET Framework 4.8.1 및 기타 버전
제품 버전
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1