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 class HsmPool : IDisposable | |
{ | |
internal bool disposedValue; | |
internal SocketPool buffer; | |
private readonly HSMContext settings; | |
static object _initializeBufferLock = new object(); | |
public HsmPool(IOptions<HSMContext> context) | |
{ | |
settings = context.Value; |
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.Collections.Concurrent; | |
using System.Net.Sockets; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Super.GlobalPlatform.HSM.Application | |
{ | |
public class SocketPool : IDisposable | |
{ |
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
namespace Oragon.Common.RingBuffer.Specialized | |
{ | |
public class SocketRingBuffer : DisposableRingBuffer<Socket> | |
{ | |
public SocketRingBuffer(int capacity, Func<Socket> bufferFactory) : base(capacity, bufferFactory) | |
{ | |
} | |
public override IAccquisitonController<Socket> Accquire() => new ScoketAccquisitonController(this.availableBuffer, this.WaitTime, this.itemFactoryFunc); |
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
namespace Oragon.Common.RingBuffer.Specialized | |
{ | |
public class SocketRingBuffer : DisposableRingBuffer<Socket> | |
{ | |
public SocketRingBuffer(int capacity, Func<Socket> bufferFactory) : base(capacity, bufferFactory) | |
{ | |
} | |
public override IAccquisitonController<Socket> Accquire() => new ScoketAccquisitonController(this.availableBuffer, this.WaitTime, this.itemFactoryFunc); |
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
FROM alefcarlos/aspnet-grpc:3.0 | |
WORKDIR /app | |
COPY publish/ . | |
ENTRYPOINT ["./RifeAi.Account.Grpc", "--urls", "http://+:81"] |
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 Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Routing; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using PlusUltra.Grpc.WebServer.Hosting; | |
namespace GrpcSample | |
{ | |
public class Startup : GrpcServerStartup |
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 Program { | |
static void Main(){ | |
//Obtém config(para ajustes finos de acordo com a necessidade) | |
var value = Convert.ToInt32(ConfigurationManager.AppSettings["MinThreads"]); | |
//Altera os valores, retorná true caso tenha conseguido | |
var success = ThreadPool.SetMinThreads(value, value); | |
//TODO: ..... |
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 admin = require('firebase-admin'); | |
var Excel = require('exceljs'); | |
var serviceAccount = require(`${__dirname}/key.json`); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
databaseURL: 'https://log-controller.firebaseio.com' | |
}); |
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 admin = require('firebase-admin'); | |
var Excel = require('exceljs'); | |
var serviceAccount = require(`${__dirname}/key.json`); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
databaseURL: 'https://log-controller.firebaseio.com' | |
}); |
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
import 'package:firebase_auth/firebase_auth.dart'; | |
class UserDataInfo { | |
FirebaseUser _user; | |
UserDataInfo._(); | |
String get id => _user.uid; | |
String get email => isLoggedIn ? _user.email : null; | |
bool get isLoggedIn => _user != null; |
NewerOlder