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; | |
public static class Extensions | |
{ | |
public static TResult With<TResult, TObject>(this TObject self, Func<TObject, TResult> func) where TObject : class | |
{ | |
return self == null ? default(TResult) : func(self); | |
} | |
/// <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
public static class CrmEntityExtension | |
{ | |
public static CrmEntityReference AsEntityReference(this CrmEntity self) | |
{ | |
return new CrmEntityReference(self.LogicalName, self.Id); | |
} | |
} |
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
/*! | |
* What the extension does and who made it. | |
* | |
* Copyright 1970, Who Made It | |
* How it's licensed | |
*/ | |
(function($){ | |
$.fn.extend({ | |
extensionName: function(options) { | |
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 class ExtendedApprovals | |
{ | |
/// <summary> | |
/// This compares a PDF document saved in a byte stream. | |
/// </summary> | |
/// <param name="bytes">A byte array that represents the contents of the PDF file to be verified</param> | |
public static void VerifyPdf(byte[] bytes) | |
{ | |
var actual = ScrubCreationDateInPdf(bytes); |
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.Text.RegularExpressions; | |
using System.Web.Mvc; | |
/// <summary> | |
/// Model metadata property names are typically CamelCased. When used as a human-readable text, eg. in LabelFor etc, this metadata provider | |
/// will un-camelcase the name of the property, so you don't have to add a DisplayNameAttribute to every single property in your model. | |
/// </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; | |
using System.Linq.Expressions; | |
using System.Web.Mvc; | |
public static class ActionDescriptorDescribesActionExtension | |
{ | |
public static bool DescribesAction<TController>(this ActionDescriptor self, Expression<Func<TController, object>> action) where TController : IController | |
{ | |
var actionName = | |
(action.Body is UnaryExpression |
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.Linq; | |
using System.Web; | |
public class ImageHttpHandler : IHttpHandler | |
{ | |
21public bool IsReusable | |
{ | |
get | |
{ |
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
#language: nl | |
Functionaliteit: Een nieuwe feature | |
Om domme fouten te voorkomen | |
Als wiskundemalloot | |
Wil ik de som van twee getallen optellen | |
Scenario: Optellen | |
Stel ik heb 50 op de rekenmachine ingevoerd | |
En ik heb 70 op de rekenmachine ingevoerd | |
Als ik op optellen druk |
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
<system.net> | |
<mailSettings> | |
<smtp deliveryMethod="Network" from="someaddress@example.com"> | |
<network | |
host="mail.example.com" | |
userName="something@example.com" | |
password="*************" | |
port="25" /> | |
</smtp> | |
</mailSettings> |
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 static class HtmlExtensions | |
{ | |
public static IHtmlString DropDownListFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, Dictionary<string, IEnumerable<SelectListItem>> selectList) | |
{ | |
/* | |
* <select name="tmodel"> | |
* <optgroup title="Items"> | |
* <option value="item">Item</option> | |
* </select> | |
*/ |