/// <summary> /// Set the value of a configuration item attribute. For attributes with a data reference or non-configuration item attributes, consult the documentation for streams. /// </summary> /// <param name="AttrID">The WebID of the AF Attribute to be updated.</param> /// <param name="Value">The AFValue to be applied to the Attribute.</param> /// <returns>Returns true if the value update completes.</returns> /// <remarks>Users must be aware of the value type that the attribute takes before changing the value. If a value entered by the user does not match the value type expressed in the attribute, it will not work or it will return an error.</remarks> public bool SetValue(LazyPI.Common.Connection Connection, string AttrID, LazyObjects.AFValue Value) { WebAPIConnection webConnection = (WebAPIConnection)Connection; var request = new RestRequest("/attributes/{webId}/value", Method.PUT); request.AddUrlSegment("webId", AttrID); request.AddBody(Value); var statusCode = webConnection.Client.Execute(request).StatusCode; return((int)statusCode == 204); }
/// <summary> /// Sets the value of the attribute. /// </summary> /// <param name="Value">A partial AFValue that should be created.</param> /// <returns>Returns true if no errors occur.</returns> public bool SetValue(AFValue Value) { return(_AttrLoader.SetValue(_Connection, this._ID, Value)); }
/// <summary> /// Sets the value of the attribute. /// </summary> /// <param name="Value">A partial AFValue that should be created.</param> /// <returns>Returns true if no errors occur.</returns> public bool SetValue(AFValue Value) { return _AttrLoader.SetValue(_Connection, this._ID, Value); }
/// <summary> /// Sets the value of the attribute. /// </summary> /// <param name="Value">A partial AFValue that should be created.</param> /// <returns>Returns true if no errors occur.</returns> public bool SetValue(AFValue Value) { return(_AttrController.SetValue(_Connection, WebID, Value)); }