ModelService.FromName Method (ModelItem, String, StringComparison)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Locates the ModelItem in the given scope with the given name.
Namespace: System.Activities.Design.Services
Assembly: System.Activities.Design.Base (in System.Activities.Design.Base.dll)
Syntax
'Declaration
Public MustOverride Function FromName ( _
scope As ModelItem, _
name As String, _
comparison As StringComparison _
) As ModelItem
'Usage
Dim instance As ModelService
Dim scope As ModelItem
Dim name As String
Dim comparison As StringComparison
Dim returnValue As ModelItem
returnValue = instance.FromName(scope, _
name, comparison)
public abstract ModelItem FromName(
ModelItem scope,
string name,
StringComparison comparison
)
public:
virtual ModelItem^ FromName(
ModelItem^ scope,
String^ name,
StringComparison comparison
) abstract
public abstract function FromName(
scope : ModelItem,
name : String,
comparison : StringComparison
) : ModelItem
abstract FromName :
scope:ModelItem *
name:string *
comparison:StringComparison -> ModelItem
Parameters
- scope
Type: System.Activities.Design.Model.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
Type: System.String
The name to locate.
- comparison
Type: System.StringComparison
Determines how the name should be compared. The default is to compare against ordinal.
Return Value
Type: System.Activities.Design.Model.ModelItem
Returns a ModelItem whose name matches name, or nulla null reference (Nothing in Visual Basic) if no match was found.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | name is nulla null reference (Nothing in Visual Basic). |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 4