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 async Task<ActionResult> BuyProductAsync(ProductPurchase purchase) { | |
Customer customer = await dbContext.Customers.FindAsync(purchase.CustomerId); | |
Order order = await orderService.CreateOrderAsync(customer, purchase); | |
Payment payment = await paymentService.PostPaymentAsync(order); | |
await emailService.SendEmailAsync(customer.Email, new Email("Payment was processed!")); | |
await bus.PublishAsync(new OrderCreatedEvent { Id = order.Id }); | |
} |
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; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace StringCalculator | |
{ | |
public class Calculator : ICalculator | |
{ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>action</key> | |
<false/> | |
<key>category</key> | |
<string>SCRIPTS</string> | |
<key>command</key> | |
<string>#Desc: Downloads given link with axel |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace StringCalculator | |
{ | |
public class Calculator | |
{ | |
private static readonly Regex _inputParsingRegex = new Regex(@"(?<definition>//(?<delimiter>.+)\n).*"); |
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 Sorting | |
{ | |
public static class Expression | |
{ | |
public static Type GetExpressionReturningType(this LambdaExpression expression) | |
{ | |
MemberInfo memberInfo = GetMemberInfo(expression); | |
if (memberInfo != null) | |
return GetMemberUnderlyingType(memberInfo); |