Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

void TagLib::Riff::List::SetValue ( ByteVector  id,
IEnumerable< string >  values 
) [inline]

Sets the value for a specified item in the current instance to the contents of a T:System.Collections.Generic.IEnumerable`1.

id A ByteVector object containing the ID of the item to set.
values A T:System.Collections.Generic.IEnumerable`1 containing the string objects to store in the specified item.
ArgumentNullException id is .
ArgumentException id isn't exactly four bytes long.

Definition at line 483 of file List.cs.

                  if (id == null)
                        throw new ArgumentNullException ("id");
                  if (id.Count != 4)
                        throw new ArgumentException (
                              "ID must be 4 bytes long.", "id");
                  if (values == null) {
                        RemoveValue (id);
                  ByteVectorCollection l = new ByteVectorCollection ();
                  foreach (string value in values) {
                        if (string.IsNullOrEmpty (value))
                        ByteVector data = ByteVector.FromString (value,
                        data.Add (0);
                        l.Add (data);
                  if (l.Count == 0)
                        RemoveValue (id);
                        SetValue (id, l);

Generated by  Doxygen 1.6.0   Back to index