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
#define DotNetRuntimeExe "NDP461-KB3102436-x86-x64-AllOS-ENU.exe" | |
[CustomMessages] | |
InstallingDotNetFramework=Installing .NET Framework. This might take a few minutes... | |
DotNetFrameworkFailedToLaunch=Failed to launch .NET Framework Installer with error "%1". Please fix the error then run this installer again. | |
DotNetFrameworkFailed1602=.NET Framework installation was cancelled. This installation can continue, but be aware that this application may not run unless the .NET Framework installation is completed successfully. | |
DotNetFrameworkFailed1603=A fatal error occurred while installing the .NET Framework. Please fix the error, then run the installer again. | |
DotNetFrameworkFailed5100=Your computer does not meet the requirements of the .NET Framework. Please consult the documentation. | |
DotNetFrameworkFailedOther=The .NET Framework installer exited with an unexpected status code "%1". Please review any other messages shown by the installer to determine whether the installation completed successfully, and abort this |
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.Windows.Data; | |
using System.Windows.Markup; | |
namespace LocalizationDemo.Localization | |
{ | |
public class LocExtension : MarkupExtension | |
{ | |
/// <summary> | |
/// Gets or sets the key to use to look up the appropriate value to display. |
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 class Foo : IEquatable<Foo> | |
{ | |
public int Bar { get; set; } | |
public int Baz { get; set; } | |
public override bool Equals(object obj) | |
{ | |
return this.Equals(obj as Foo); | |
} | |
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 class GlobalKeyboardHook : IDisposable | |
{ | |
private delegate IntPtr LowLevelKeyboardProc(int nCode, int wParam, IntPtr lParam); | |
private const int WH_KEYBOARD_LL = 13; | |
private const int WM_KEYDOWN = 0x0100; | |
private const int WM_KEYUP = 0x0101; | |
private const int VK_SHIFT = 0x10; | |
private const int VK_CONTROL = 0x11; |
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.IO; | |
using System.Runtime.InteropServices; | |
namespace FilesystemUtils | |
{ | |
public class AtomicFileStream : FileStream | |
{ | |
private const int DefaultBufferSize = 4096; | |
private const string DefaultTempFileSuffix = ".tmp"; |
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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Xml.Serialization; | |
namespace ConfigManager | |
{ | |
public class ConfigManager : IDisposable | |
{ |
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 ReactiveExtensionsExtensions | |
{ | |
public static async Task SubscribeAsync<T>(this IObservable<T> observable, Action<T> onNext, CancellationToken? cancellationToken = null) | |
{ | |
CancellationToken token = cancellationToken ?? CancellationToken.None; | |
var cts = new TaskCompletionSource<bool>(); | |
using(token.Register(() => cts.SetCanceled())) | |
{ | |
observable.Subscribe(onNext, ex => cts.SetException(ex), () => cts.SetResult(true), token); | |
await cts.Task; |
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 PasswordHelpers | |
{ | |
private static bool GetPasswordInitialized(DependencyObject obj) | |
{ | |
return (bool)obj.GetValue(PasswordInitializedProperty); | |
} | |
private static void SetPasswordInitialized(DependencyObject obj, bool value) | |
{ | |
obj.SetValue(PasswordInitializedProperty, value); | |
} |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace TaskSchedulerTest | |
{ | |
/// <summary> |
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
#!/bin/bash | |
SVN="svn/trunk" | |
MASTER="master" | |
die() { echo "$@" >&2; exit 1; } | |
ensure_clean() | |
{ | |
if ! git diff --no-ext-diff --ignore-submodules --quiet --exit-code; then |