mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-05 23:06:10 +00:00
* add custom properties model and clients * observable * observable tests * add search * error CS8370: 'target-typed object creation' * Error CS8370: 'target-typed object creation' * add patch with body that return status code * fixes for failed ConventionTests * working UnitTests * (de)serialization and model tests * Update Repository.cs
52 lines
1.6 KiB
C#
52 lines
1.6 KiB
C#
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
|
|
namespace Octokit
|
|
{
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
public class OrganizationCustomPropertyValuesRequest : SearchRepositoriesRequest
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="OrganizationCustomPropertyValuesRequest"/> class.
|
|
/// </summary>
|
|
public OrganizationCustomPropertyValuesRequest() : base()
|
|
{ }
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="OrganizationCustomPropertyValuesRequest"/> class.
|
|
/// </summary>
|
|
public OrganizationCustomPropertyValuesRequest(string term)
|
|
: base(term)
|
|
{ }
|
|
|
|
public override string Sort => null;
|
|
|
|
/// <summary>
|
|
/// Get the query parameters that will be appending onto the search
|
|
/// </summary>
|
|
public new IDictionary<string, string> Parameters
|
|
{
|
|
get
|
|
{
|
|
var parameters = base.Parameters;
|
|
|
|
// Remove the default sort and order parameters as they are not supported by the API
|
|
parameters.Remove("order");
|
|
parameters.Remove("sort");
|
|
|
|
// Replace the default query parameter "q" with the custom query parameter
|
|
var query = parameters["q"];
|
|
|
|
if (!string.IsNullOrWhiteSpace(query))
|
|
{
|
|
parameters.Add("repository_query", query);
|
|
}
|
|
|
|
parameters.Remove("q");
|
|
|
|
return parameters;
|
|
}
|
|
}
|
|
}
|
|
}
|