Méthode | Description | |
---|---|---|
AddRedirect ( bool isRegex, string oldUrl, string newUrl, string notes ) : |
Add a new redirect to the redirects collection
|
|
DeleteRedirect ( int id ) : void |
Handles deleting a redirect from the redirect collection
|
|
FindRedirect ( string oldUrl ) : |
Handles finding a redirect based on the oldUrl
|
|
GetAllRedirects ( ) : IEnumerable |
Get all redirects from the repositry
|
|
GetLookupTable ( ) : Redirect>.Dictionary |
Get the lookup table for quick lookups
|
|
UpdateRedirect ( |
Update a given redirect
|
Méthode | Description | |
---|---|---|
DetectLoop ( string oldUrl, string newUrl ) : bool |
Detects a loop in the redirects list given the new redirect. Uses Floyd's cycle-finding algorithm.
|
|
FetchRedirectById ( int id ) : |
Fetches a single redirect from the DB based on an Id
|
|
FetchRedirectsFromDb ( ) : Redirect>.Dictionary |
Fetches all redirects from the database
|
|
RedirectRepository ( ) : System |
public static AddRedirect ( bool isRegex, string oldUrl, string newUrl, string notes ) : |
||
isRegex | bool | |
oldUrl | string | Old Url to redirect from |
newUrl | string | New Url to redirect to |
notes | string | Any associated notes with this redirect |
Résultat |
public static DeleteRedirect ( int id ) : void | ||
id | int | Id of redirect to remove |
Résultat | void |
public static FindRedirect ( string oldUrl ) : |
||
oldUrl | string | Url to search for |
Résultat |
public static GetAllRedirects ( ) : IEnumerable |
||
Résultat | IEnumerable |
public static GetLookupTable ( ) : Redirect>.Dictionary |
||
Résultat | Redirect>.Dictionary |
public static UpdateRedirect ( |
||
redirect | Redirect to update | |
Résultat |