Redigera

Dela via


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.

public:
 System::Activities::Presentation::Model::ModelItem ^ FromName(System::Activities::Presentation::Model::ModelItem ^ scope, System::String ^ name);
public System.Activities.Presentation.Model.ModelItem FromName (System.Activities.Presentation.Model.ModelItem scope, string name);
member this.FromName : System.Activities.Presentation.Model.ModelItem * string -> System.Activities.Presentation.Model.ModelItem
Public Function FromName (scope As ModelItem, name As String) As ModelItem

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

FromName(ModelItem, String, StringComparison)

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

public:
 abstract System::Activities::Presentation::Model::ModelItem ^ FromName(System::Activities::Presentation::Model::ModelItem ^ scope, System::String ^ name, StringComparison comparison);
public abstract System.Activities.Presentation.Model.ModelItem FromName (System.Activities.Presentation.Model.ModelItem scope, string name, StringComparison comparison);
abstract member FromName : System.Activities.Presentation.Model.ModelItem * string * StringComparison -> System.Activities.Presentation.Model.ModelItem
Public MustOverride Function FromName (scope As ModelItem, name As String, comparison As StringComparison) As ModelItem

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