本文整理汇总了C#中FlickrNet.PhotoSearchOptions.AddLicense方法的典型用法代码示例。如果您正苦于以下问题:C# PhotoSearchOptions.AddLicense方法的具体用法?C# PhotoSearchOptions.AddLicense怎么用?C# PhotoSearchOptions.AddLicense使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlickrNet.PhotoSearchOptions
的用法示例。
在下文中一共展示了PhotoSearchOptions.AddLicense方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PhotosSearch
// Actual PhotoSearch function
/// <summary>
/// Search for photos.
/// </summary>
/// <param name="userId">The ID of the user to search the photos of.</param>
/// <param name="tags">A comma seperated list of tags to search for.</param>
/// <param name="tagMode">Match all tags, or any tag.</param>
/// <param name="text">Text to search for in photo title or description.</param>
/// <param name="perPage">Number of photos to return per page.</param>
/// <param name="page">The page number to return.</param>
/// <param name="extras">Optional extras to return.</param>
/// <param name="minUploadDate">The minimum upload date.</param>
/// <param name="maxUploadDate">The maxmimum upload date.</param>
/// <param name="license">The license type to return.</param>
/// <returns>A <see cref="Photos"/> instance.</returns>
public Photos PhotosSearch(string userId, string tags, TagMode tagMode, string text, DateTime minUploadDate, DateTime maxUploadDate, int license, int perPage, int page, PhotoSearchExtras extras)
{
PhotoSearchOptions options = new PhotoSearchOptions();
options.UserId = userId;
options.Tags = tags;
options.TagMode = tagMode;
options.Text = text;
options.MinUploadDate = minUploadDate;
options.MaxUploadDate = maxUploadDate;
if( license > 0 ) options.AddLicense(license);
options.PerPage = perPage;
options.Page = page;
options.Extras = extras;
return PhotosSearch(options);
}