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"?> | |
<configuration> | |
<startup> | |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" /> | |
</startup> | |
<system.serviceModel> | |
<behaviors> | |
<serviceBehaviors> | |
<behavior> | |
<serviceDebug includeExceptionDetailInFaults="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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<startup> | |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" /> | |
</startup> | |
<system.serviceModel> | |
<client> | |
<endpoint name="IMathService" address="net.pipe://localhost/MathService" binding="netNamedPipeBinding" contract="MathService.Server.IMathService" /> | |
</client> | |
</system.serviceModel> |
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; | |
using System.Reflection; | |
public static class EnumExtensions | |
{ | |
public static string ToDescription(Enum value) | |
{ | |
FieldInfo field = value.GetType().GetField(value.ToString()); |
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.Collections.Generic; | |
using System.Linq; | |
public static class EnumerableExtensions | |
{ | |
public static IEnumerable<T> Yield<T>(T item) | |
{ | |
yield return item; | |
} |
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.OleDb; | |
using System.IO; | |
namespace AccessScripter | |
{ | |
internal static class Program | |
{ | |
private static IDictionary<string, string> providers = new Dictionary<string, string> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Align Numbers</title> | |
<script type="text/javascript" src="../../tiny_mce_popup.js"></script> | |
<script type="text/javascript" src="dialog.js"></script> | |
</head> | |
<body> | |
<form> | |
<label> |
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.ComponentModel; | |
using System.ComponentModel.DataAnnotations; | |
using System.Linq; | |
using System.Web.Mvc; | |
public class TrimmingModelBinder : DefaultModelBinder | |
{ | |
protected override void SetProperty(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, object value) | |
{ | |
if (propertyDescriptor.PropertyType == typeof(string)) |
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.Web; | |
using System.Web.Mvc; | |
public class Global : HttpApplication | |
{ | |
protected void Application_Start(object sender, EventArgs e) | |
{ | |
ModelBinders.Binders.DefaultBinder = new ModelBinderBase(); | |
} |
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.DataAnnotations; | |
using System.Reflection; | |
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] | |
public sealed class LaterThanAttribute : ValidationAttribute | |
{ | |
public override bool RequiresValidationContext | |
{ | |
get { return 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.Collections.Generic; | |
using System.IO; | |
using System.Web.UI; | |
public class HtmlTextWriter : System.Web.UI.HtmlTextWriter | |
{ | |
private ICollection<string> cssClasses; | |
public HtmlTextWriter(TextWriter writer) | |
: base(writer) |