This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* {Boolean} useLocalStorageIfAvailable - optional, defaults to true. The CacheProvider object will | |
* use the HTML5 localStorage object, if available | |
*/ | |
function CacheProvider(useLocalStorageIfAvailable) { | |
// values will be stored here | |
this._cache = {}; | |
this._useLocalStorage = 'undefined' == typeof(useLocalStorageIfAvailable) ? true : useLocalStorageIfAvailable; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using System.Windows.Data; | |
/// <summary> | |
/// Converts a boolean value to a string value. For example, if the paramter passed in is "Elephant,Giraffe" | |
/// then a boolean true would convert to "Elephant" and false to "Giraffe" | |
/// </summary> | |
public class BooleanToStringCustomValueConverter : IValueConverter | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ObservableCollectionExt { | |
public static void Populate<T>(this ObservableCollection<T> collection, IEnumerable<T> itemsToAdd) { | |
collection.Clear(); | |
foreach (T item in itemsToAdd) | |
{ | |
collection.Add(item); | |
} | |
} | |
} |
NewerOlder