共用方式為


CimSubscriptionDeliveryOptions.SetString Method (String, String, UInt32)

 

Sets the value of a named string option.

Namespace:   Microsoft.Management.Infrastructure.Options
Assembly:  Microsoft.Management.Infrastructure (in Microsoft.Management.Infrastructure.dll)

Syntax

public void SetString(
    string optionName,
    string optionValue,
    uint flags
)
public:
void SetString(
    String^ optionName,
    String^ optionValue,
    unsigned int flags
)
member SetString : 
        optionName:string *
        optionValue:string *
        flags:uint32 -> unit
Public Sub SetString (
    optionName As String,
    optionValue As String,
    flags As UInteger
)

Parameters

  • optionValue
    Type: System.String

    The string value to use for the option name.

Remarks

Use this method to set the __MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_BOOKMARK option. This option requests a starting point for the subscription.

The bookmark in the optionValue parameter is a logical position in the event stream.

There are two predefined bookmark values; an empty string represents the latest location and "http://schemas.dmtf.org/wbem/wsman/1/wsman/bookmark/earliest" represents the earliest available location. Otherwise, the bookmark is a string previously sent by the server and is opaque to the client.

Examples

CimSubscriptionDeliveryOptions deliveryOptions = new
CimSubscriptionDeliveryOptions(CimSubscriptionDeliveryType.Pull);
deliveryOptions.SetString("__MI_SUBSCRIPTIONDELIVERYOPTIONS_SET_BOOKMARK", "<SomeBookMark>", 0);

See Also

CimSubscriptionDeliveryOptions Class
Microsoft.Management.Infrastructure.Options Namespace

Return to top