This file contains 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.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
// OBSOLETE!!! Use the Nuget WinRTTimeZones package for the latest or | |
// get the code at https://github.com/onovotny/WinRTTimeZones | |
namespace TimeZoneUtils |
This file contains 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
// These classes would go in your PCL | |
public interface IWrappedCollectionView | |
{ | |
bool MoveCurrentTo(object item); | |
bool MoveCurrentToPosition(int position); | |
bool IsCurrentAfterLast { get; } | |
bool MoveCurrentToFirst(); | |
bool IsCurrentBeforeFirst { get; } | |
bool MoveCurrentToLast(); |
This file contains 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 IAsyncAction ExecuteOnUIThread<TException>(DispatchedHandler action) | |
{ | |
return CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, action); | |
} |
This file contains 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
internal class Job : IDisposable | |
{ | |
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)] | |
static extern IntPtr CreateJobObject(IntPtr a, string lpName); | |
[DllImport("kernel32.dll")] | |
static extern bool SetInformationJobObject(IntPtr hJob, JobObjectInfoType infoType, IntPtr lpJobObjectInfo, UInt32 cbJobObjectInfoLength); | |
[DllImport("kernel32.dll", SetLastError = true)] | |
static extern bool AssignProcessToJobObject(IntPtr job, IntPtr process); |
This file contains 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
class AuthenticatedHttpClientHandler : HttpClientHandler | |
{ | |
private readonly Func<Task<string>> getToken; | |
public AuthenticatedHttpClientHandler(Func<Task<string>> getToken) | |
{ | |
if (getToken == null) throw new ArgumentNullException("getToken"); | |
this.getToken = getToken; | |
} |
This file contains 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.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using System.Windows.Media; | |
using System.Windows.Media.Imaging; | |
using News.Controls; |
This file contains 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
Param( | |
[string]$pathToSearch = $env:BUILD_SOURCESDIRECTORY, | |
[string]$buildNumber = $env:BUILD_BUILDNUMBER | |
) | |
try | |
{ | |
$buildPattern = "\d+\.\d+\.\d+\.\d+" | |
if ($buildNumber -match $buildPattern -ne $true) { |
This file contains 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.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
internal class Job : IDisposable | |
{ |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="14.0" DefaultTargets="UpdateVersion" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Import Project="$(MSBuildProjectDirectory)\Build.tasks" /> | |
<!-- Setup configuration variables --> | |
<PropertyGroup> | |
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)..\</SolutionDir> | |
<Configuration Condition="'$(OS)' == 'Windows_NT' And '$(Configuration)' == ''">Debug</Configuration> | |
<ConfigFolderPath>$(Configuration)</ConfigFolderPath> |
This file contains 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.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Security.Claims; | |
using System.Threading.Tasks; | |
using System.Web; | |
using IdentityServer3.Core.Models; | |
using IdentityServer3.Core.Services; |
OlderNewer