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 MockIAPLib; | |
using Store = MockIAPLib; | |
namespace YourAPP | |
{ | |
/// <summary> | |
/// Service for mocking in-app purchases in debug mode | |
/// </summary> | |
public class MockWindowsPhoneStoreService: IWindowsPhoneStoreService |
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
function requestQueue(url, startCallback, doneCallback) { | |
var requests = []; | |
function createRequest(parameters) { | |
var f = function() { | |
$.post(url, parameters) | |
.done(function() { | |
if (requests.length > 0) { | |
//console.log("processing next request"); | |
var next = requests.pop(); |
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
private static string _flurryCode = "...."; |
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
List<int> numbers= Enumerable.Range(1,10); | |
List<int> evenNumbers= new List<int>(); | |
foreach (int number in numbers) | |
{ | |
if (number % 2 ==0) | |
{ | |
evenNumbers.Add(number) | |
} | |
} |
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
var hardwareId = packageSpecificToken.Id; | |
var signature = packageSpecificToken.Signature; | |
var certificate = packageSpecificToken.Certificate; |
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 event PropertyChangedEventHandler PropertyChanged; | |
protected void NotifyPropertyChanged(string propertyname) | |
{ | |
if (PropertyChanged != null) | |
{ | |
PropertyChanged(this, new PropertyChangedEventArgs(propertyname)); | |
} | |
} |
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
string sIsoStorePath = @"\Shared\ShellContent\tile.png"; | |
using (IsolatedStorageFile appStorage = IsolatedStorageFile.GetUserStoreForApplication()) | |
{ | |
String sDirectory = System.IO.Path.GetDirectoryName(sIsoStorePath); | |
if (!appStorage.DirectoryExists(sDirectory)) | |
{ | |
appStorage.CreateDirectory(sDirectory); | |
} | |
using (IsolatedStorageFileStream stream = new IsolatedStorageFileStream(sIsoStorePath, System.IO.FileMode.Create, appStorage)) |
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 TicketViewModel(Newtonsoft.Json.Linq.JToken ticket) | |
{ _city = (string)ticket.SelectToken("city"); | |
_cityCes = (string)ticket.SelectToken("city_ces"); | |
_currency = (string)ticket.SelectToken("currency"); | |
.... | |
} |
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
<phone:PhoneApplicationPage.Resources> | |
<local:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/> | |
</phone:PhoneApplicationPage.Resources> |
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
partial class AccountInTime | |
{ | |
public Document ToDocument() | |
{ | |
Document document = new Document(); | |
document["_id"] = AccountId; | |
Type accountInTimeType = this.GetType(); | |
PropertyInfo[] fieldInfo = accountInTimeType.GetProperties(); | |
string[] bannedProperties = {"User", "Account"}; | |
foreach (PropertyInfo info in fieldInfo) |