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.Reflection; | |
namespace Util | |
{ | |
public static class ObjectExtensions | |
{ | |
public static T ToObject<T>(this IDictionary<string, object> source) | |
where T : class, new() | |
{ | |
var someObject = new T(); |
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
require "uri" | |
require "json" | |
require "net/http" | |
require 'time' | |
class CustomerData | |
attr_reader :id | |
def initialize(email, id, fullName, phone, terms) | |
@email = email | |
@id = 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 DemoFb.Models; | |
using System.Web.Mvc; | |
using Newtonsoft.Json; | |
namespace DemoFb.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
//TODO: Pass configuration to web config. | |
private readonly string FbAppId = "app-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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
<!--SFTP--> | |
<add key="Host" value="" /> | |
<add key="UploadFolder" value="/mis/myfolder/Upload_Test/{0}" /> | |
<add key="ArchiveFolder" value="/mis/myfolder/Archive/" /> | |
<add key="SFTP_User" value="" /> | |
<add key="SFTP_Pass" value="" /> |
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"?> | |
<configuration> | |
<appSettings> | |
<!--SendGrid Configuration--> | |
<add key ="SendGridKey" value="Example.Key"/> | |
<!--Emails--> | |
<add key ="DX Team" value="test@example.com"/> | |
</appSettings> | |
</configuration> |
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 Microsoft.Azure; | |
using Microsoft.WindowsAzure.Storage; | |
using Microsoft.WindowsAzure.Storage.Blob; | |
using System; | |
using System.Collections.Generic; | |
namespace Azure.Storage | |
{ | |
public class BlobStorage | |
{ |
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 LiteDB; | |
using System; | |
namespace LiteDbDemo | |
{ | |
public class LiteDbBase : IDisposable | |
{ | |
private readonly string DbFile = "MyData.db"; | |
private LiteDatabase _liteDatabase; | |
public LiteDatabase LiteDb |
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 QRCoder; | |
using System.Drawing; | |
using System.Linq; | |
using static QRCoder.PayloadGenerator; | |
namespace Support | |
{ | |
/// <summary> | |
/// QR Code bar genetor using (QR Coder Library). | |
/// <seealso cref="https://github.com/codebude/QRCoder"/> |
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 NodaTime; | |
using NodaTime.Text; | |
using System; | |
using System.IO; | |
namespace ConsoleAppDemo | |
{ | |
/// <summary> | |
/// Noda Time API. Use for convert into different timezones. | |
/// <seealso cref="https://nodatime.org"/> |
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.Collections.Generic; | |
using System.Linq; | |
namespace ConsoleAppDemo | |
{ | |
public static class StringUtil | |
{ | |
private const string Space = " "; | |
public static string WithoutSpaces(this string value) |
NewerOlder