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
namespace Extensions { | |
public static class StreamExtensions | |
{ | |
/// <summary> | |
/// Implementation of <see cref="Stream.CopyTo(System.IO.Stream)"/> with progress reporting | |
/// </summary> | |
/// <param name="fromStream"></param> | |
/// <param name="destination"></param> | |
/// <param name="bufferSize"></param> | |
/// <param name="progressInfo"></param> |
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-16"?> | |
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
<RegistrationInfo> | |
<Date>2014-02-20T16:20:55.1120404</Date> | |
<Author>[account]</Author> | |
<Description>Attempts to start SERVICE_NAME. Logs the attempt to start it to a log file if the service was not started.</Description> | |
</RegistrationInfo> | |
<Triggers> | |
<EventTrigger> | |
<Enabled>true</Enabled> |
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
<#@ template debug="false" hostspecific="false" language="C#" #> | |
<#@ assembly name="System.Core" #> | |
<#@ import namespace="System" #> | |
<#@ output extension=".cs" #> | |
<# | |
string datePattern = "fffssmmHHddMMyyyy"; | |
string buildTime = DateTime.Now.ToString(datePattern); | |
string humanReadableBuildTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff"); | |
#>using System; | |
using System.Globalization; |
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.ComponentModel; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace Extensions | |
{ | |
public static class ComponentModelExtensions | |
{ | |
public static TProperty GetPropertyValueOrDefault<TSource, TProperty>( |
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
<# | |
.SYNOPSIS | |
Applies SQL group membership (unless exists) on availablitiy group nodes using windows login, from a definition file. | |
.DESCRIPTION | |
Applies SQL group membership (unless exists) on availablitiy group nodes using windows logins and groups, from a definition file. | |
Based on a role definition file, SQL snippets are generated and then executed. | |
Removes any login/dbuser mapping that are in conflict with the securityDefinitionFile specification. | |
.PARAMETER masterEndpoints | |
List of FQDN[,<port>] of SQL nodes participating in the availability group | |
.PARAMETER instanceEndpoint |
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
namespace CustomMessageBoxes | |
{ | |
partial class MessageBoxWithCheckBox | |
{ | |
/// <summary> | |
/// Required designer variable. | |
/// </summary> | |
private System.ComponentModel.IContainer components = null; | |
/// <summary> |
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.Linq; | |
namespace System.Collections.Generic | |
{ | |
public class EmptyReadOnlyDictionary<TKey, TValue> : IReadOnlyDictionary<TKey, TValue> | |
{ | |
private static readonly Lazy<IEnumerable<KeyValuePair<TKey, TValue>>> Empty = | |
new Lazy<IEnumerable<KeyValuePair<TKey, TValue>>>(Enumerable.Empty<KeyValuePair<TKey, TValue>>); | |
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => Empty.Value.GetEnumerator(); |
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.Data.Entity; | |
using System.Data.Entity.Validation; | |
using System.Linq; | |
public interface IEntity | |
{ | |
int Id { get; set; } | |
} |
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
#%HOMEPATH%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 | |
function gitpushup { git rev-parse --abbrev-ref HEAD | foreach { git push --set-upstream origin $_ }} | |
set-alias git-pushup gitpushup | |
function gitmergedev { git rev-parse --abbrev-ref HEAD | foreach { if (git checkout develop) {git pull; git checkout $_;git merge develop; }}} | |
set-alias git-mergedev gitmergedev | |
function gitmergemas { git rev-parse --abbrev-ref HEAD | foreach { if (git checkout master) {git pull; git checkout $_;git merge master; }}} | |
set-alias git-mergemas gitmergemas |
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
/* Source: https://github.com/domaindrivendev/Swashbuckle/issues/1287 */ | |
(...) | |
config.AddSwaggerGen(options => { | |
options.DocumentFilter<SwaggerAddEnumDescriptions>(); | |
} |
OlderNewer