// Token: 0x06000528 RID: 1320 RVA: 0x00013480 File Offset: 0x00011680
        public bool SetValue(string propertyName, object propertyValue, RegistryValueKind valueKind, bool isBestEffort, ReadWriteConstraints constraints)
        {
            bool result = false;

            using (ClusdbMarshalledProperty clusdbMarshalledProperty = ClusdbMarshalledProperty.Create(propertyName, propertyValue, valueKind))
            {
                if (clusdbMarshalledProperty != null)
                {
                    int num = ClusapiMethods.ClusterRegSetValue(this.KeyHandle, clusdbMarshalledProperty.PropertyName, clusdbMarshalledProperty.ValueKind, clusdbMarshalledProperty.PropertyValueIntPtr, clusdbMarshalledProperty.PropertyValueSize);
                    if (num != 0)
                    {
                        if (!isBestEffort)
                        {
                            throw AmExceptionHelper.ConstructClusterApiException(num, "ClusterRegSetValue()", new object[0]);
                        }
                    }
                    else
                    {
                        result = true;
                    }
                }
                else if (!isBestEffort)
                {
                    string typeName = (propertyValue != null) ? propertyValue.GetType().Name : "<null>";
                    throw new ClusterApiException("ClusterRegSetValue(unsupported registry type)", new ClusterUnsupportedRegistryTypeException(typeName));
                }
            }
            return(result);
        }
        // Token: 0x060004FB RID: 1275 RVA: 0x00012F34 File Offset: 0x00011134
        public void SetValue(string propertyName, object propertyValue, RegistryValueKind valueKind)
        {
            ClusdbMarshalledProperty clusdbMarshalledProperty = ClusdbMarshalledProperty.Create(propertyName, propertyValue, valueKind);

            if (clusdbMarshalledProperty == null)
            {
                throw new ClusterApiException("WfcDataStoreBatch.SetValue - property value is null", new ClusterUnsupportedRegistryTypeException("null"));
            }
            this.properties.Add(clusdbMarshalledProperty);
            int num = ClusapiMethods.ClusterRegBatchAddCommand(this.batchHandle, CLUSTER_REG_COMMAND.CLUSREG_SET_VALUE, clusdbMarshalledProperty.PropertyName, clusdbMarshalledProperty.ValueKind, clusdbMarshalledProperty.PropertyValueIntPtr, clusdbMarshalledProperty.PropertyValueSize);

            if (num != 0)
            {
                throw AmExceptionHelper.ConstructClusterApiException(num, "ClusterRegBatchAddCommand(CLUSREG_SET_VALUE)", new object[0]);
            }
            Interlocked.Increment(ref this.totalCommands);
        }