Interface IFiddlerPreferences
The IFiddlerPreferences Interface is exposed by the FiddlerApplication.Prefs object, and enables callers to Add, Update, and Remove preferences, as well as observe changes to the preferences.
Namespace: Fiddler
Assembly: FiddlerCore.dll
Syntax
public interface IFiddlerPreferences : IEnumerable<KeyValuePair<string, string>>, IEnumerable
Properties
Item[String]
Indexer. Returns the value of the preference as a string
Declaration
string this[string sName] { get; set; }
Parameters
System. The Preference Name |
Property Value
System. The Preference value as a string, or null |
Methods
AddWatcher(String, EventHandler<PrefChangeEventArgs>)
Add a Watcher that will be notified when a value has changed within the specified prefix.
Declaration
PreferenceBag.PrefWatcher AddWatcher(string sPrefixFilter, EventHandler<PrefChangeEventArgs> pcehHandler)
Parameters
System. The prefix of preferences for which changes are interesting |
System. The Event handler to notify |
Returns
Preference Returns the Watcher object added to the notification list |
GetBoolPref(String, Boolean)
Get a preference's value as a boolean
Declaration
bool GetBoolPref(string sPrefName, bool bDefault)
Parameters
System. The Preference Name |
System. The default value for missing or invalid preferences |
Returns
System. A Boolean |
GetInt32Pref(String, Int32)
Gets a preference's value as a 32-bit integer
Declaration
int GetInt32Pref(string sPrefName, int iDefault)
Parameters
System. The Preference Name |
System. The default value for missing or invalid preferences |
Returns
System. An integer |
GetStringPref(String, String)
Gets a preference's value as a string
Declaration
string GetStringPref(string sPrefName, string sDefault)
Parameters
System. The Preference Name |
System. The default value for missing preferences |
Returns
System. A string |
RemovePref(String)
Removes a named preference from storage
Declaration
void RemovePref(string sPrefName)
Parameters
System. The name of the preference to remove |
RemoveWatcher(PreferenceBag.PrefWatcher)
Removes a previously-created preference Watcher from the notification queue
Declaration
void RemoveWatcher(PreferenceBag.PrefWatcher wliToRemove)
Parameters
Preference The Watcher to remove |
SetBoolPref(String, Boolean)
Store a boolean value for a preference
Declaration
void SetBoolPref(string sPrefName, bool bValue)
Parameters
System. The named preference |
System. The boolean value to store |
SetInt32Pref(String, Int32)
Store an Int32 value for a preference
Declaration
void SetInt32Pref(string sPrefName, int iValue)
Parameters
System. The named preference |
System. The int32 value to store |
SetPrefs(IEnumerable<KeyValuePair<String, String>>)
Store multiple preferences.
Declaration
void SetPrefs(IEnumerable<KeyValuePair<string, string>> prefs)
Parameters
System. An enumeration of the preferences' names and values to store. |
SetStringPref(String, String)
Store a string value for a preference
Declaration
void SetStringPref(string sPrefName, string sValue)
Parameters
System. The named preference |
System. The string value to store |