21 Commits

Author SHA1 Message Date
Brendan Forster 8d7bda96e4 handle case insensitive headers when parsing for API rate limiting (#2175) 2020-04-12 13:04:30 -03:00
Cédric Luthi c94cd05b8b Obsolete UnixTimestampExtensions methods (#2121)
* The equivalent of `public static DateTimeOffset FromUnixTime(this long unixTime)` exists in the framework since .NET Framework 4.6: https://docs.microsoft.com/en-us/dotnet/api/system.datetimeoffset.fromunixtimeseconds
* The equivalent of `public static long ToUnixTime(this DateTimeOffset date)` exists in the framework since .NET Framework 4.6: https://docs.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tounixtimeseconds
2020-03-03 09:30:30 -04:00
tasadar2 3345f76fc9 Adding a convention test to detect whether a model has a constructor exposing all properties (#1798)
* Added a convention test to detect a model constructor exposing all properties

* add ctors to classes where they are missing

* rename ctor parameters that dont match properties

* add missing parameters to existing ctors

* add specific PunchCard ctor to allow mocking, and update test to resolve call ambiguity

* Added base class properties to the convention test

Added member exclusion attribute

* Updated newly offending classes

2 excludes and 2 ctors

* rename exclusion attribute to be a bit shorter
2018-04-25 21:03:13 +10:00
Itai Bar-Haim 4e804f61a6 Prefer using nameof(x) over literal "x" (#1781)
* updated XML docs and added some missing bits.

* prefer nameof(x) over literal "x"
2018-03-07 20:43:10 +10:00
Mickaël Derriey 13d5dab516 Port to .NET Core (#1503)
Port to .NET Core
2017-01-21 14:42:02 +10:00
Mordechai Zuber 4be25ba8bd Add missing SecurityCritical attribute
Fixes #1471
2016-10-13 15:54:27 +03:00
Mordechai Zuber 44304ca70b use string per recommended style 2015-12-16 21:23:36 +02:00
Haacked f3f7161017 🔥 Remove redundant this qualifier 2015-12-13 22:22:54 -08:00
Brendan Forster 80719c0033 aaaand format the code 2015-11-04 13:38:51 -08:00
Brendan Forster 87d24f5fa7 fixed impacted tests 2015-09-10 15:38:00 +09:30
Brendan Forster 23735d61e2 bugfix: setter removed 2015-09-10 14:17:45 +09:30
Brendan Forster 9198f80e5d Merge pull request #860 from octokit/haacked/code-cleanup
Tidying up some code
2015-09-10 11:41:48 +09:00
Mark Taylor 07d6a8ad60 Minor changes based on feedback 2015-08-28 15:25:32 +01:00
Mark Taylor b2c7e1c2a7 Chnage LastApiInfo to GetLastApiInfo with cloned version 2015-08-16 21:27:26 +01:00
Haacked eb5d14cfdc Organize usings and remove unused 2015-08-04 21:12:37 -07:00
Haacked 15ae4257fa 🎨 Remove redundant type name prefix
The namespace portion of the type name is declared in a using statement.
2015-08-04 21:00:25 -07:00
Mark Taylor 4d9cc4ff09 Additional changes following review 2015-07-27 14:07:15 +01:00
Mark Taylor d5d264d05b Added changes to handle NETFX_CORE properly (I hope) 2015-07-26 22:43:04 +01:00
Mark Taylor e092a109ea Additional changes to support rate_limit API call 2015-07-26 22:03:19 +01:00
Amy Palamountain 8469a50c11 Unix Timestamp helper 2014-02-16 17:05:07 +13:00
Haacked 14ad942ea8 RateLimit class encapsulates rate limit headers
Added a RateLimit class to encapsulate pulling rate limit information
from the headers. This is now exposed by ApiInfo as well as the
RateLimitExceeededException. That way these two classes are not grabbing
the same information in different ways which we were doing before.
2013-10-18 14:49:00 -07:00