PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.WebObjectExtensions Class Reference

Provides some more object extensions, for webby usages. More...

Static Public Member Functions

static string AsQueryString (this object o)
 Provides a query string for the given object data.
static string AsQueryStringParameters (this object o)
 Provides query string parameters for the given object data.
static IDictionary< string, object > AsDictionary (this object obj)
 Attempts to provide a dictionary representation for the provided object. If the provided object already is.

Detailed Description

Provides some more object extensions, for webby usages.

Member Function Documentation

◆ AsDictionary()

IDictionary< string, object > PeanutButter.Utils.WebObjectExtensions.AsDictionary ( this object obj)
static

Attempts to provide a dictionary representation for the provided object. If the provided object already is.

Parameters
obj
Returns
Exceptions
NotSupportedException

◆ AsQueryString()

string PeanutButter.Utils.WebObjectExtensions.AsQueryString ( this object o)
static

Provides a query string for the given object data.

  • empty if the object is empty or null
  • with a preceding ? otherwise
Parameters
o
Returns

◆ AsQueryStringParameters()

string PeanutButter.Utils.WebObjectExtensions.AsQueryStringParameters ( this object o)
static

Provides query string parameters for the given object data.

  • empty if the object is empty or null
  • everything after the ? on an url otherwise
Parameters
o
Returns

The documentation for this class was generated from the following file:
  • source/Utils/PeanutButter.Utils/WebObjectExtensions.cs