/// <summary> /// Static constructor /// </summary> static HttpMethod() { getMethod = new HttpMethod("GET"); postMethod = new HttpMethod("POST"); putMethod = new HttpMethod("PUT"); deleteMethod = new HttpMethod("DELETE"); headMethod = new HttpMethod("HEAD"); optionsMethod = new HttpMethod("OPTIONS"); traceMethod = new HttpMethod("TRACE"); patchMethod = new HttpMethod("PATCH"); }
/// <summary> /// Equality between this instance and other HttpMethod instance /// </summary> /// <param name="other">Other HttpMethod instance</param> /// <returns>Equality or not</returns> public bool Equals(HttpMethod other) { if (other == null) return false; return (Object.ReferenceEquals(this.method, other.method) || (String.Compare(this.method, other.method) == 0)); }