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
{ | |
"title": "Exceptionless", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"id": 0, | |
"color": "#7EB26D", | |
"alias": "", | |
"pin": 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
class EmptyCollectionContractResolver : DefaultContractResolver { | |
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) { | |
JsonProperty property = base.CreateProperty(member, memberSerialization); | |
Predicate<object> shouldSerialize = property.ShouldSerialize; | |
property.ShouldSerialize = obj => (shouldSerialize == null || shouldSerialize(obj)) && !IsEmptyCollection(property, obj); | |
return property; | |
} | |
private bool IsEmptyCollection(JsonProperty property, object target) { |
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
var client = new ExceptionlessClient(config => { | |
// Set your API key. | |
config.ApiKey = "API_KEY_HERE"; | |
// Send events to your own free Exceptionless server install. | |
config.ServerUrl = "https://exceptionless.myorg.com"; | |
// Read config settings from attributes. | |
config.ReadFromAttributes(); |
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
{ | |
"version": "0.1-alpha-*", | |
"compilationOptions": { | |
"warningsAsErrors": true | |
}, | |
"dependencies": { | |
"Microsoft.AspNet.Http": "0.1-alpha-*", | |
"Microsoft.AspNet.Mvc.Common": "", | |
"Microsoft.AspNet.Mvc.ModelBinding": "", | |
"Microsoft.AspNet.Routing": "0.1-alpha-*", |
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
Bootstrap.Run(config => { | |
config.IncludeAssemblyFor<Type>(); | |
config.IncludeAssembly(Assembly); | |
config.UseAutoMapper(mapper => mapper.UseSomeOption()); | |
config.UseAutofac(); | |
config.LogToConsole(); | |
}; | |
Bootstrap.Run(config => | |
config |
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 CodeSmith.Core.Helpers; | |
using Exceptionless; | |
namespace SampleConsole { | |
internal class Program { | |
private static void Main() { | |
ExceptionlessClient.Current.Startup(); | |
SendOne(); | |
ExceptionlessClient.Current.ProcessQueue(); |
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> | |
<configSections> | |
<section name="exceptionless" type="Exceptionless.Configuration.ExceptionlessSection, Exceptionless" /> | |
</configSections> | |
<!-- attribute names are cases sensitive, must specify a path that you have write access to --> | |
<exceptionless apiKey="API_KEY_HERE" enableLogging="true" logPath="C:\log.txt" /> | |
... | |
<system.webServer> | |
<validation validateIntegratedModeConfiguration="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
Handlebars.registerHelper 'each_with_index', (array, fn) -> | |
buffer = '' | |
for i in array | |
item = i | |
item.index = _i | |
buffer += fn(item) | |
buffer |
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
// {{#each_with_index records}} | |
// <li class="legend_item{{index}}"><span></span>{{Name}}</li> | |
// {{/each_with_index}} | |
Handlebars.registerHelper("each_with_index", function(array, fn) { | |
var buffer = ""; | |
for (var i = 0, j = array.length; i < j; i++) { | |
var item = array[i]; | |
// stick an index property onto the item, starting with 1, may make configurable later |
NewerOlder