Exemple #1
0
        /// <summary>
        /// Perfomrs DELETE method
        /// </summary>
        /// <param name="links"></param>
        /// <param name="rel"></param>
        /// <param name="options"></param>
        public void Delete(List <Link> links, string rel, GenericOptions options)
        {
            string followingUri = LinkRelations.FindLinkAsString(
                links,
                rel);

            this.Delete(followingUri, options == null ? null : options.ToQueryList());
        }
Exemple #2
0
        /// <summary>
        /// Performs PUT method
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <typeparam name="R"></typeparam>
        /// <param name="links"></param>
        /// <param name="rel"></param>
        /// <param name="input"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public R Put <T, R>(List <Link> links, string rel, T input, GenericOptions options)
        {
            string followingUri = LinkRelations.FindLinkAsString(
                links,
                rel);
            R result = this.Put <T, R>(followingUri, input, options == null ? null : options.ToQueryList());

            return(result);
        }
Exemple #3
0
        /// <summary>
        /// For using custom, non-standard URI posts no in the model
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <typeparam name="R"></typeparam>
        /// <param name="fullUri"></param>
        /// <param name="input"></param>
        /// <param name="otherParts"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public R Post <T, R>(String fullUri, T input, IDictionary <Stream, string> otherParts, GenericOptions options)
        {
            R obj = default(R);

            obj = this.PostMultiparts <T, R>(fullUri, input, otherParts, options == null ? null : options.ToQueryList());
            return(obj);
        }
Exemple #4
0
        /// <summary>
        /// Perfomrs POST method
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="links"></param>
        /// <param name="rel"></param>
        /// <param name="input"></param>
        /// <param name="mime"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public T Post <T>(List <Link> links, string rel, Stream input, string mime, GenericOptions options)
        {
            string followingUri = LinkRelations.FindLinkAsString(
                links,
                rel);
            T result = this.PostRaw <T>(followingUri, input, mime, options == null ? null : options.ToQueryList());

            return(result);
        }
Exemple #5
0
        /// <summary>
        /// Perfomrs POST method
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="links"></param>
        /// <param name="rel"></param>
        /// <param name="input"></param>
        /// <param name="otherParts"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public T Post <T>(List <Link> links, string rel, T input, IDictionary <Stream, string> otherParts, GenericOptions options)
        {
            string followingUri = LinkRelations.FindLinkAsString(
                links,
                rel);
            T result = this.PostMultiparts <T>(followingUri, input, otherParts, options == null ? null : options.ToQueryList());

            return(result);
        }