Export (0) Print
Expand All

ManagementCommitAttribute Class

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Marks a class method that is called after all the properties of a class are updated. The properties of a class are marked with the ManagementConfiguration attribute. If a class has multiple configuration properties that are all updated together, the class should have a method that is marked with the ManagementCommit attribute. The marked function is not thread safe.

Namespace: System.Management
Assembly:   System.Core (in System.Core.dll)

'Declaration
<AttributeUsageAttribute(AttributeTargets.Method)> _
Public NotInheritable Class ManagementCommitAttribute _
	Inherits ManagementMemberAttribute
'Usage
Dim instance As ManagementCommitAttribute
Not applicable.

If no method is marked with the ManagementCommit attribute, the class manages the configuration updates by itself without any indication that the update has completed.

The method marked with the ManagementCommit attribute does not take any parameters and it has a void return type.

[C#]

public class Process
{
    /// Key attribute marks a key property. Keys are not changeable.
    /// Keys have to be unique information.
    [ManagementKey]
    public int Id 
    {
        get {    }
    }
                                                        
    /// ManagementConfiguration stands for read/write manageable
    /// property from a read/write field.
    [ManagementConfiguration]
    public string UserDefinedString;

    [ManagementCommit]
    void SaveOnDevice();
}

System.Object
  System.Attribute
    System.Management.ManagementMemberAttribute
      System.Management.ManagementCommitAttribute

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows Server 2003, Windows XP SP2, Windows Vista

The .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.5
Show:
© 2014 Microsoft