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 interface IDbSession | |
| { | |
| IDbConnection Connection { get; } | |
| } | |
| public class SqlSession : IDbSession | |
| { | |
| private static readonly object @lock = new object(); | |
| private readonly string connectionString; |
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.Net; | |
| using System.Web.Mvc; | |
| namespace Fabrik.Common.Web | |
| { | |
| public class HijaxAttribute : ActionFilterAttribute | |
| { | |
| public override void OnActionExecuting(ActionExecutingContext filterContext) | |
| { | |
| if (CanBeHijaxed(filterContext)) |
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
| $(".hijax").submit(function (e) { | |
| var $form = $(this), | |
| validator = $form.data("validator"); | |
| if (!$form.valid()) { | |
| return; | |
| }; | |
| $.ajax({ | |
| url: this.action, |
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
| void heading1_tag() | |
| { | |
| before = () => html = "<h1></h1>"; | |
| it["adds a paragraph with style 'Heading1'"] = () | |
| => pdf.LastParagraph.Style.should_be("Heading1"); | |
| } | |
| void heading2_tag() | |
| { | |
| before = () => html = "<h2></h2>"; |
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 Microsoft.WindowsAzure.Storage; | |
| using Microsoft.WindowsAzure.Storage.Blob; | |
| using System; | |
| using System.Threading; | |
| namespace Utils.Migrations | |
| { | |
| public class BlobCopy | |
| { | |
| private readonly CloudStorageAccount sourceAccount; |
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
| namespace Fabrik.Common.Net | |
| { | |
| /// <summary> | |
| /// RFC5988 Link relation types <see cref="http://www.iana.org/assignments/link-relations/link-relations.xml"/>. | |
| /// </summary> | |
| public static class LinkRelations | |
| { | |
| /// <summary> | |
| /// Refers to a resource that is the subject of the link's 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
| using Newtonsoft.Json.Linq; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Net; | |
| using System.Web.Http; | |
| using System.Web.Http.ModelBinding; | |
| namespace Fabrik.CMS.API.Client | |
| { | |
| [Serializable] |
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
| { | |
| "_links": { | |
| "self": [ | |
| { | |
| "href": "/orders/10" | |
| } | |
| ], | |
| "warehouse": [ | |
| { | |
| "href": "/warehouse/10" |
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 Newtonsoft.Json; | |
| using System; | |
| using System.Collections.Concurrent; | |
| using System.Collections.Generic; | |
| using System.ComponentModel.DataAnnotations; | |
| using System.Diagnostics.CodeAnalysis; | |
| using System.Dynamic; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Net; |
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
| [TestFixture] | |
| public class InboundRouteTests | |
| { | |
| private Uri baseUri; | |
| private HttpConfiguration config; | |
| [TestFixtureSetUp] | |
| public void FixtureSetUp() | |
| { | |
| baseUri = new Uri("https://tests.local"); |