// GetResourceAllocSettings gets the resource allocation settings for the specified
// resoutce sub type and class.
GetResourceAllocSettings gets the resource allocation settings for the specified
resoutce sub type and class.
// GetResourceAllocSettings gets the resource allocation settings for the specified // resoutce sub type and class .
func GetResourceAllocSettings(con *wmi.WMI, resourceSubType string, class string) (*wmi.Result, error) {
	qParams := []wmi.Query{
		&wmi.AndQuery{
			wmi.QueryFields{
				Key:   "InstanceID",
				Value: "%%\\\\Default",
				Type:  wmi.Like,
			},
		},
	}
	if resourceSubType != "" {
		qParams = append(qParams, &wmi.AndQuery{
			wmi.QueryFields{
				Key:   "ResourceSubType",
				Value: resourceSubType,
				Type:  wmi.Equals,
			},
		})
	}
	settingsData, err := con.GetOne(class, []string{}, qParams)
	if err != nil {
		return nil, errors.Wrap(err, "getting result")
	}
	return settingsData, nil
}
func GetResourceAllocSettings ( con * wmi . WMI , resourceSubType string , class string ) ( * wmi . Result , error ) { qParams := [ ] wmi . Query { & wmi . AndQuery { wmi . QueryFields { Key : " " , Value : " \\ \\ " , Type : wmi . Like , } , } , } if resourceSubType != " " { qParams = append ( qParams , & wmi . AndQuery { wmi . QueryFields { Key : " " , Value : resourceSubType , Type : wmi . Equals , } , } ) } settingsData , err := con . GetOne ( class , [ ] string { } , qParams ) if err != nil { return nil , errors . Wrap ( err , " " ) } return settingsData , nil }
GetResourceAllocSettings gets the resource allocation settings for the specified
resoutce sub type and class.
GetResourceAllocSettings gets the resource allocation settings for the specified resoutce sub type and class .