Skip to content

Instantly share code, notes, and snippets.

View alexandrebl's full-sized avatar
🛰️
Working from space

ABrandaoL alexandrebl

🛰️
Working from space
View GitHub Profile
@alexandrebl
alexandrebl / CancellationTaskExample.cs
Last active March 23, 2017 23:15
C# .Net Task Cancellation Token Example
using System;
using System.Threading;
using System.Threading.Tasks;
namespace ApplicationTask.CancellationTokenExample {
/// <summary>
/// Classe
/// </summary>
class Program {
@alexandrebl
alexandrebl / RabbitMQAPIManagerInfo.cs
Created June 14, 2016 22:39
Obtem status do RabbitMQ através da API REST
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using RestSharp;
using RestSharp.Authenticators;
namespace RabbitMQRestApiManager {
@alexandrebl
alexandrebl / MongoDBPersitDataExample.cs
Last active March 23, 2017 23:15
Exemplo de persistência de dados utilizando o MongoDB
using System;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Driver;
using Newtonsoft.Json;
namespace MongoDBPersitDataExample {
/// <summary>
/// Programa principal
/// Dependências NuGet: install-package mongocsharpdriver
@alexandrebl
alexandrebl / RedisConnectionManager.cs
Created June 15, 2016 19:42
Gerenciador de conexão com o Redis Cache
using DNAuth.FrameworkUtility.Configs.Interfaces;
using RedisBoost;
using System.Threading.Tasks;
namespace FrameworkUtility.Clients {
/// <summary>
/// Gerenciador de conexão do Redis
/// </summary>
public class CacheConnectionManager {
using Newtonsoft.Json;
using StackExchange.Redis;
using StackExchange.Redis.Extensions.Core;
using StackExchange.Redis.Extensions.Newtonsoft;
namespace Library {
/// <summary>
/// Gerenciador de cache
/// </summary>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using StackExchange.Redis;
using System;
using System.Timers;
using Topshelf;
namespace TopshelfTry {
/// <summary>
/// Camada de processamento
/// </summary>
public class ProcessLayer {
#include <boost/crc.hpp>
#include <ios>
#include <iostream>
#include <string>
//Define namespace
using namespace std;
//Main method
int main()
using System;
using System.Threading;
public class TaskInfo {
public RegisteredWaitHandle Handle = null;
public string OtherInfo = "default";
}
public class Example {
public static void Main(string[] args) {
using System;
using Akka.Actor;
namespace akkat1 {
internal class Program {
private static void Main() {
var actorSystem = ActorSystem.Create("IDGActorSystem");
var basicActor = actorSystem.ActorOf<ConsoleActor>();
basicActor.Tell("Initialized");
Console.ReadLine();