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

static internal string FlickrNet::Utils::ExtrasToString ( PhotoSearchExtras  extras  )  [inline, static, private]

Utility method to convert the PhotoSearchExtras enum to a string.

                    PhotoSearchExtras extras = PhotoSearchExtras.DateTaken & PhotoSearchExtras.IconServer;
                    string val = Utils.ExtrasToString(extras);
                    Console.WriteLine(val);
outputs: "date_taken,icon_server";

Parameters:
extras 
Returns:

Definition at line 105 of file Utils.cs.

            {
                  System.Text.StringBuilder sb = new System.Text.StringBuilder();
                  if( (extras & PhotoSearchExtras.DateTaken) == PhotoSearchExtras.DateTaken )
                        sb.Append("date_taken");
                  if( (extras & PhotoSearchExtras.DateUploaded) == PhotoSearchExtras.DateUploaded )
                  {
                        if( sb.Length>0 ) sb.Append(",");
                        sb.Append("date_upload");
                  }
                  if( (extras & PhotoSearchExtras.IconServer) == PhotoSearchExtras.IconServer )
                  {
                        if( sb.Length>0 ) sb.Append(",");
                        sb.Append("icon_server");
                  }
                  if( (extras & PhotoSearchExtras.License) == PhotoSearchExtras.License )
                  {
                        if( sb.Length>0 ) sb.Append(",");
                        sb.Append("license");
                  }
                  if( (extras & PhotoSearchExtras.OwnerName) == PhotoSearchExtras.OwnerName )
                  {
                        if( sb.Length>0 ) sb.Append(",");
                        sb.Append("owner_name");
                  }
                  if( (extras & PhotoSearchExtras.OriginalFormat) == PhotoSearchExtras.OriginalFormat )
                  {
                        if( sb.Length>0 ) sb.Append(",");
                        sb.Append("original_format");
                  }

                  if( (extras & PhotoSearchExtras.LastUpdated) == PhotoSearchExtras.LastUpdated )
                  {
                        if( sb.Length>0 ) sb.Append(",");
                        sb.Append("last_update");
                  }

                  if( (extras & PhotoSearchExtras.Tags) == PhotoSearchExtras.Tags )
                  {
                        if( sb.Length>0 ) sb.Append(",");
                        sb.Append("tags");
                  }

                  if( (extras & PhotoSearchExtras.Geo) == PhotoSearchExtras.Geo )
                  {
                        if( sb.Length>0 ) sb.Append(",");
                        sb.Append("geo");
                  }

                  return sb.ToString();
            }


Generated by  Doxygen 1.6.0   Back to index