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
if (profiler != null) | |
{ | |
// HACK: unviewed ids are added to this list during Storage.Save, but we know we haven't see the current one yet, | |
// so go ahead and add it to the end - it's usually the only id, but if there was a redirect somewhere, it'll be there, too | |
Profiler.Settings.EnsureStorageStrategy(); | |
var ids = Profiler.Settings.Storage.GetUnviewedIds(profiler.User); | |
ids.Add(profiler.Id); | |
path = @"/" + (path ?? "") + EndpointHost.Config.ServiceStackHandlerFactoryPath; |
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 Elmah; | |
using Microsoft.ApplicationServer.Caching; | |
using ServiceStack.CacheAccess; | |
namespace BusinessLogic | |
{ | |
public class AzureCacheClient : ICacheClient | |
{ |
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
/// <summary> | |
/// Sets the Cross Origin Response Object for a given bucket | |
/// </summary> | |
/// <param name="bucket"></param> | |
private void SetCors(IBucket bucket) | |
{ | |
ICors cors = new Cors(); | |
cors.AddOrigin("http://yourdomainhere.com"); | |
cors.AddMethod("GET"); | |
cors.MaxAge = 1800; |
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
$('#saveSample').click(function () { | |
$('#loading').show(); | |
try { | |
var buffer = getFinalSampleBuffer(); | |
} | |
catch (ex) { | |
Mashup.ShowMessage(ex); | |
return false; | |
} |
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 JsonResult PrintForm(string html) | |
{ | |
try | |
{ | |
var contentPath = Server.MapPath("~/Content/"); | |
var css = System.IO.File.ReadAllText(Path.Combine(contentPath + "bootstrap.css")); | |
var fullHtml = string.Format(@"<!DOCTYPE html> <html> <head><style type='text/css'> {0} </style></head><body> {1} </body></html>",css, html); | |
var config = new ObjectConfig(); | |
config.SetAllowLocalContent(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
public ActionResult PrintForm(string html) | |
{ | |
var globalConfig = new GlobalConfig(); | |
globalConfig.SetPaperSize(PaperKind.Letter); | |
var margins = new Margins(100, 100, 100, 100); | |
globalConfig.SetMargins(margins); | |
var synchronizedPechkin = new SynchronizedPechkin(globalConfig); | |
var config = new ObjectConfig(); | |
config.SetAllowLocalContent(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
public ActionResult PrintForm(string html) | |
{ | |
var globalConfig = new GlobalConfig(); | |
globalConfig.SetPaperSize(PaperKind.Letter); | |
var margins = new Margins(100, 100, 100, 100); | |
globalConfig.SetMargins(margins); | |
var synchronizedPechkin = new SynchronizedPechkin(globalConfig); | |
var config = new ObjectConfig(); | |
config.SetAllowLocalContent(true) |