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
| (function () { | |
| TextFilterWidget.prototype.renderWidget = (function(fn) { | |
| return function() { | |
| this.value.filterType = '2'; | |
| fn.call(this); | |
| }; | |
| })(TextFilterWidget.prototype.renderWidget); | |
| })(); |
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
| @model MyViewModel | |
| <div>My strong-typed name is @Model.Name</div> |
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 Context : IContext | |
| { | |
| public readonly ServiceEntities _entities; | |
| #region Constructor | |
| public Context() | |
| { | |
| _entities = new ServiceEntities(); | |
| } |
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 abstract class DataController : Controller | |
| { | |
| private IContext _context; | |
| #region Constructor | |
| protected DataController() | |
| { | |
| _context = new Context(); | |
| } |
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 Account | |
| { | |
| #region Abstract | |
| private static string GenerateHash(string password, string salt, int iterations) | |
| { | |
| using (var rfc2898DeriveBytes = new Rfc2898DeriveBytes(password, Convert.FromBase64String(salt), iterations)) | |
| { | |
| return Convert.ToBase64String(rfc2898DeriveBytes.GetBytes(64)); | |
| } |
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
| /* tslint:disable:no-eval */ | |
| /* tslint:disable:no-shadowed-variable */ | |
| /* tslint:disable:restrict-plus-operands */ | |
| /** | |
| * Provides a synchronous require implementation for development purposes. | |
| * @author Roel van Uden | |
| * @license MIT | |
| */ | |
| let require = ((): {(id: string): any, detour?: (id: string, value: string | ((id: string) => any)) => void} => { |
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.Net; | |
| using System.Net.Sockets; | |
| using System.Threading.Tasks; | |
| namespace Test { | |
| internal class Program { | |
| public static void Main() { | |
| var client = Task.Run(() => Client()); |
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.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Runtime.CompilerServices; | |
| namespace Rs.Os | |
| { | |
| internal abstract class Bindable : IBindable | |
| { | |
| #region Abstract |
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
| /** | |
| * Extracts the property name from a property expression function. | |
| * @param fn The function. | |
| * @return The property name. | |
| */ | |
| function nameof(fn: Function): string { | |
| var body = fn ? fn.toString() : null; | |
| var lambdaExpression = body ? body.match(/(?:=>|return)\s*(.+?)\s*(?:;|}|$)/) : null; | |
| var propertyExpression = lambdaExpression ? lambdaExpression[1].match(/\.\s*(.+?)\s*$/) : null; | |
| if (propertyExpression != null) { |
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 Context : IContext | |
| { | |
| private readonly Entities _entities; // EF6+ DbContext | |
| #region Constructor | |
| static Context() | |
| { | |
| var ensureReference = SqlProviderServices.Instance; | |
| } |