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.String
sName
The Preference Name |
Property Value
System.String
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.String
sPrefixFilter
The prefix of preferences for which changes are interesting |
System.EventHandler<PrefChangeEventArgs>
pcehHandler
The Event handler to notify |
Returns
PreferenceBag.PrefWatcher
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.String
sPrefName
The Preference Name |
System.Boolean
bDefault
The default value for missing or invalid preferences |
Returns
System.Boolean
A Boolean |
GetInt32Pref(String, Int32)
Gets a preference's value as a 32-bit integer
Declaration
int GetInt32Pref(string sPrefName, int iDefault)
Parameters
System.String
sPrefName
The Preference Name |
System.Int32
iDefault
The default value for missing or invalid preferences |
Returns
System.Int32
An integer |
GetStringPref(String, String)
Gets a preference's value as a string
Declaration
string GetStringPref(string sPrefName, string sDefault)
Parameters
System.String
sPrefName
The Preference Name |
System.String
sDefault
The default value for missing preferences |
Returns
System.String
A string |
RemovePref(String)
Removes a named preference from storage
Declaration
void RemovePref(string sPrefName)
Parameters
System.String
sPrefName
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
PreferenceBag.PrefWatcher
wliToRemove
The Watcher to remove |
SetBoolPref(String, Boolean)
Store a boolean value for a preference
Declaration
void SetBoolPref(string sPrefName, bool bValue)
Parameters
System.String
sPrefName
The named preference |
System.Boolean
bValue
The boolean value to store |
SetInt32Pref(String, Int32)
Store an Int32 value for a preference
Declaration
void SetInt32Pref(string sPrefName, int iValue)
Parameters
System.String
sPrefName
The named preference |
System.Int32
iValue
The int32 value to store |
SetPrefs(IEnumerable<KeyValuePair<String, String>>)
Store multiple preferences.
Declaration
void SetPrefs(IEnumerable<KeyValuePair<string, string>> prefs)
Parameters
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>
prefs
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.String
sPrefName
The named preference |
System.String
sValue
The string value to store |