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 Index() | |
{ | |
var json = new StreamReader(Request.InputStream).ReadToEnd(); | |
//RWM: The next line turns the faux-array into an actual one. | |
json = string.Format("[{0}]", json.Replace("}" + Environment.NewLine + "{", "},{")); | |
var models = JsonConvert.DeserializeObject<List<SendGridEventModel>>(json); | |
models.ForEach(c => ProcessEvent(c)); | |
return new HttpStatusCodeResult(HttpStatusCode.OK); | |
} |
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
private async void listBox_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) | |
{ | |
var result = (Contact)e.Item.AssociatedDataItem.Value; | |
var test = new ContactInformation(); | |
test.GivenName = result.CompleteName.FirstName; | |
test.FamilyName = result.CompleteName.LastName; | |
test.DisplayName = result.DisplayName; | |
var vCard = await test.ToVcardAsync(); | |
var tempName = Guid.NewGuid().ToString() + ".vcf"; |
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 static class ApplicationInfo | |
{ | |
#region Private Members | |
const string AppManifestName = "WMAppManifest.xml"; | |
const string AppNodeName = "App"; | |
#endregion |
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.Text; | |
using System.Web.Security; | |
namespace AdvancedREI.Providers | |
{ | |
public class DecryptingSqlMembershipProvider : SqlMembershipProvider | |
{ | |
/// <summary> |
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 Kendo.Mvc.UI; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Security.AntiXss; | |
using System.Web.Util; | |
namespace Your.Namespace.Here | |
{ | |
public static class KendoMvcExtensions | |
{ |
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
2013-07-23 01:50:06,174 [7] Orchard.Exceptions.DefaultExceptionPolicy - An unexpected exception was caught | |
Autofac.Core.DependencyResolutionException: None of the constructors found with 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Vandelay.Industries.Services.FaviconService' can be invoked with the available services and parameters: | |
Cannot resolve parameter 'Orchard.Media.Services.IMediaService mediaService' of constructor 'Void .ctor(Orchard.IWorkContextAccessor, Orchard.Caching.ICacheManager, Orchard.Caching.ISignals, Orchard.Media.Services.IMediaService)'. | |
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) in c:\Projects\OSS\autofac\Core\Source\Autofac\Core\Activators\Reflection\ReflectionActivator.cs:line 106 | |
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) in c:\Projects\OSS\autofac\Core\Source\Autofac\Core\Resolving\InstanceLookup.cs:line 79 | |
at Autofac.Co |
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 partial class App : Application | |
{ | |
public static ListingInformation MarketplaceListing { get; set; } | |
//RWM: The rest of your startup code goes here... | |
} |
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
CREATE FUNCTION [yourmobileservicesschema].[GetAvgRatingForPicture](@pictureId bigint) | |
RETURNS int | |
AS | |
BEGIN | |
DECLARE @r decimal(3,2) | |
select @r = AVG(rating) from PictureRatings where picture_id = @pictureId | |
RETURN @r | |
END |
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
function read(query, user, request) { | |
query.toSql = function() { | |
var result = ""; | |
var queryComponents = query.getComponents(); | |
//RWM: Reflection component for getting the sort order. | |
if (queryComponents.ordering != null) { | |
queryComponents.ordering.getProperties = function() { | |
var properties = []; | |
for (var prop in this) { |
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 static void ProcessQueueMessage([QueueTrigger("events")] byte[] messageEnvelope) | |
{ | |
var message = messageEnvelope.Deserialize<string>()); | |
Trace.WriteLine(message). | |
} | |
public static T Deserialize<T>(this byte[] data) where T : class | |
{ | |
if (data == null) | |
{ |
OlderNewer