ModelService.CreateItem Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a ModelItem for a given type. This method is called by ModelFactory when the user wants to create a new item.
Overloads
CreateItem(Object) |
Takes an existing instance and creates a model item that is a deep clone of the instance. |
CreateItem(Type, CreateOptions, Object[]) |
Creates a ModelItem for a given type. This method is called by ModelFactory when the user wants to create a new item. |
CreateItem(Object)
Takes an existing instance and creates a model item that is a deep clone of the instance.
protected:
abstract System::Activities::Presentation::Model::ModelItem ^ CreateItem(System::Object ^ item);
protected abstract System.Activities.Presentation.Model.ModelItem CreateItem (object item);
abstract member CreateItem : obj -> System.Activities.Presentation.Model.ModelItem
Protected MustOverride Function CreateItem (item As Object) As ModelItem
Parameters
- item
- Object
The item to clone and wrap.
Returns
The newly created ModelItem that is a clone of the existing item.
Applies to
CreateItem(Type, CreateOptions, Object[])
Creates a ModelItem for a given type. This method is called by ModelFactory when the user wants to create a new item.
protected:
abstract System::Activities::Presentation::Model::ModelItem ^ CreateItem(Type ^ itemType, System::Activities::Presentation::Model::CreateOptions options, ... cli::array <System::Object ^> ^ arguments);
protected abstract System.Activities.Presentation.Model.ModelItem CreateItem (Type itemType, System.Activities.Presentation.Model.CreateOptions options, params object[] arguments);
abstract member CreateItem : Type * System.Activities.Presentation.Model.CreateOptions * obj[] -> System.Activities.Presentation.Model.ModelItem
Protected MustOverride Function CreateItem (itemType As Type, options As CreateOptions, ParamArray arguments As Object()) As ModelItem
Parameters
- itemType
- Type
The type of item to create.
- options
- CreateOptions
Creation options. You can specify whether you would like to initialize default values for an item.
- arguments
- Object[]
An array of arguments to the constructor of the item.
Returns
The newly created ModelItem.