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 Composite.WebApi | |
{ | |
using Composite.Community.Blog; | |
using Composite.Core.WebApi; | |
using System; | |
public class BlogPostsController : C1ApiController<Entries,Guid> |
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
internal class Startup | |
{ | |
public void Configuration(IAppBuilder app) | |
{ | |
app.UseErrorPage(); | |
app.Map("/signalr", map => | |
{ | |
var config = new HubConfiguration | |
{ |
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 Microsoft.Owin; | |
using Microsoft.Owin.Logging; | |
using Microsoft.Owin.Security.Infrastructure; | |
using Owin; | |
namespace Composite.WindowsAzure.Management.Owin | |
{ | |
public class BasicAuthenticationMiddleware : AuthenticationMiddleware<BasicAuthenticationOptions> | |
{ |
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 Microsoft.Owin.Logging; | |
using Microsoft.Owin.Security; | |
using Microsoft.Owin.Security.Infrastructure; | |
using System; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Composite.WindowsAzure.Management.Owin | |
{ | |
public class BasicAuthenticationHandler : AuthenticationHandler<BasicAuthenticationOptions> |
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.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web.Http; | |
using System.Xml.Linq; |
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.Threading.Tasks; | |
using Microsoft.Owin; | |
using Owin; | |
[assembly: OwinStartup(typeof(TypeScriptHTMLApp2.Startup))] | |
//http://www.asp.net/aspnet/overview/owin-and-katana/owin-startup-class-detection | |
namespace TypeScriptHTMLApp2 | |
{ |
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
@inherits RazorFunction | |
@functions { | |
public override string FunctionDescription | |
{ | |
get { return "A demo function that outputs a hello message."; } | |
} | |
[FunctionParameter(DefaultValue = "World")] | |
public string Name { 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
using EventCache = ConcurrentDictionary<string, KeyValuePair<DateTime, Task<List<Event>>>>; | |
public class Channel9ActionResult : IHttpActionResult | |
{ | |
private readonly HttpRequestMessage _request; | |
private static Lazy<ConcurrentDictionary<string, KeyValuePair<DateTime, Task<List<Event>>>>> _cache2 | |
= new Lazy<ConcurrentDictionary<string, KeyValuePair<DateTime, Task<List<Event>>>>>(() => | |
new ConcurrentDictionary<string, KeyValuePair<DateTime, Task<List<Event>>>>()); |
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" ?> | |
<ElementStructure xmlns="http://www.composite.net/ns/management/trees/treemarkup/1.0" xmlns:f="http://www.composite.net/ns/function/1.0"> | |
<ElementStructure.AutoAttachments> | |
<NamedParent Name="Content" Position="Top" /> | |
</ElementStructure.AutoAttachments> | |
<ElementRoot> | |
<Children> | |
<Element Id="mydemo" Label="Razor Demo" Icon="pagetype-pagetype-rootfolder" OpenedIcon="pagetype-pagetype-rootfolder-open"> |
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
@{ | |
Layout = "~/Composite/Controls/Razor/RazorLayout.cshtml"; | |
bool ShowPaid = true; | |
bool ShowShipped = false; | |
} | |
@functions | |
{ | |
public string CallbackId | |
{ |