CmdletAdapter<TObjectInstance> Class
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.
ObjectModelWrapper integrates OM-specific operations into generic cmdletization framework. For example - CimCmdletAdapter knows how to invoke a static method "Foo" in the CIM OM.
generic <typename TObjectInstance>
where TObjectInstance : classpublic ref class CmdletAdapter abstract
public abstract class CmdletAdapter<TObjectInstance> where TObjectInstance : class
type CmdletAdapter<'ObjectInstance (requires 'ObjectInstance : null)> = class
Public MustInherit Class CmdletAdapter(Of TObjectInstance)
Type Parameters
- TObjectInstance
Type that represents instances of objects from the wrapped object model
- Inheritance
-
CmdletAdapter<TObjectInstance>
- Derived
Constructors
CmdletAdapter<TObjectInstance>() |
Properties
ClassName |
Name of the class (from the object model handled by this ObjectModelWrapper) that is wrapped by the currently executing cmdlet. |
ClassVersion |
Name of the class (from the object model handled by this ObjectModelWrapper) that is wrapped by the currently executing cmdlet.
This value can be |
Cmdlet |
Cmdlet that this ObjectModelWrapper is associated with. |
ModuleVersion |
Module version. |
PrivateData |
Private data from Cmdlet Definition XML (from <ObjectModelWrapperPrivateData> element) |
Methods
BeginProcessing() |
When overridden in the derived class, performs initialization of cmdlet execution. Default implementation in the base class just returns. |
EndProcessing() |
When overridden in the derived class, performs cleanup after cmdlet execution. Default implementation in the base class just returns. |
GetQueryBuilder() |
When overridden in the derived class, creates a query builder for a given object model. |
Initialize(PSCmdlet, String, String, Version, IDictionary<String,String>) |
Class constructor. |
ProcessRecord(MethodInvocationInfo) |
Invokes a static method in the object model. |
ProcessRecord(QueryBuilder, MethodInvocationInfo, Boolean) |
Combines ProcessRecord(QueryBuilder) and ProcessRecord(TObjectInstance, MethodInvocationInfo, Boolean). |
ProcessRecord(QueryBuilder) |
Queries for object instances in the object model. |
ProcessRecord(TObjectInstance, MethodInvocationInfo, Boolean) |
Invokes an instance method in the object model. |
StopProcessing() |
When overridden in the derived class, interrupts currently running code within the CmdletAdapter<TObjectInstance>. Default implementation in the base class just returns. |