public ModuleController( IUserSession userSession, IAPIFactory apiFactory) { _userSession = userSession; _apiFactory = apiFactory; }
public MenuTagHelper( IUserSession userSession, IAPIFactory apiFactory) { _userSession = userSession; _apiFactory = apiFactory; }
public StreamStuff(IAPIFactory <INngMsg> factory) { var url = UrlIpc(); laio = factory.CreateAio().Unwrap(); daio = factory.CreateAio().Unwrap(); listener = factory.StreamListenerCreate(url).Unwrap(); dialer = factory.StreamDialerCreate(url).Unwrap(); laio.SetTimeout(Util.DelayShortMs); daio.SetTimeout(Util.DelayShortMs); listener.Listen().Unwrap(); listener.Accept(laio); dialer.Dial(daio); laio.Wait(); daio.Wait(); // Connected nng_stream is stored as aio output 0 and shouldn't be NULL Assert.NotEqual(IntPtr.Zero, laio.GetOutput(0)); Assert.NotEqual(IntPtr.Zero, daio.GetOutput(0)); lstream = factory.StreamFrom(laio).Unwrap(); dstream = factory.StreamFrom(daio).Unwrap(); }
internal Client(IAPIFactory <IMessage> factory, string uri, Action <IOptions> socketConfigurator = null, ILogger <IClient> logger = null) { this.factory = factory; this.uri = uri; this.socketConfigurator = socketConfigurator; this.logger = logger; disposeTokenSource = new CancellationTokenSource(); }
public HomeController( IUserSession userSession, IAPIFactory apiFactory, IConfiguration config) { _userSession = userSession; _apiFactory = apiFactory; _config = config; }
internal Server(ImmutableSortedDictionary <string, Func <ReadOnlySequence <byte>?, CancellationToken, ValueTask <ReadOnlySequence <byte>?> > > dict, IAPIFactory <IMessage> factory, string uri, Action <IOptions> socketConfigurator = null, ILogger <IServer> logger = null) { this.dict = dict; this.factory = factory; this.uri = uri; this.socketConfigurator = socketConfigurator; this.logger = logger; disposeTokenSource = new CancellationTokenSource(); }
public UserController ( IAPIFactory apiFactory, IConfiguration configuration, IUserSession userSession, IOptions <MailOpt> mailHelper, SQLEsUserDriver SQL2EsUserDriver ) { _apiFactory = apiFactory; Configuration = configuration; _userSession = userSession; _SQL2EsUserDriver = SQL2EsUserDriver; }
/// <summary> /// Creates a dialer or listener associated with a socket and starts it. /// </summary> /// <returns>The or listen.</returns> /// <param name="factory">Factory used to dial/listen.</param> /// <param name="socketRes">Socket the dialer/listener is associated with</param> /// <param name="url">URL used by dialer/listener</param> /// <param name="isListener">If set to <c>true</c> is listener, else is dialer</param> /// <typeparam name="TSocket">The 1st type parameter.</typeparam> /// <typeparam name="TMsg">The 2nd type parameter.</typeparam> public static NngResult <TSocket> DialOrListen <TSocket, TMsg>(this IAPIFactory <TMsg> factory, NngResult <TSocket> socketRes, string url, bool isListener) where TSocket : ISocket { if (socketRes.IsOk()) { if (isListener) { return(factory.Listen <TSocket>(socketRes, url)); } else { return(factory.Dial <TSocket>(socketRes, url)); } } return(socketRes); }
public static NngResult <ISendReceiveAsyncContext <T> > CreateAsyncContext <T>(this IRespondentSocket socket, IAPIFactory <T> factory) => factory.CreateSendReceiveAsyncContext(socket, SendReceiveContextSubtype.Survey);
public PermissionController(IUserSession userSession, IAPIFactory apiFactory) { _userSession = userSession; _apiFactory = apiFactory; }
public static INngResult <ISendReceiveAsyncContext <T> > CreateAsyncContext <T>(this IBusSocket socket, IAPIFactory <T> factory) => factory.CreateSendReceiveAsyncContext(socket);
/// <summary> /// Create subscribe node for publish/subscribe protocol /// </summary> /// <returns>The create.</returns> /// <param name="factory">Factory.</param> /// <param name="url">URL.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public static NngResult <ISubSocket> SubscriberCreate <T>(this IAPIFactory <T> factory, string url) => factory.Dial(factory.SubscriberOpen(), url);
public MsgBuilderTests(NngCollectionFixture collectionFixture) { this.factory = collectionFixture.Factory; }
public AioTests(NngCollectionFixture collectionFixture) { this.factory = collectionFixture.Factory; }
public StreamTests(NngCollectionFixture collectionFixture) { factory = collectionFixture.Factory; }
/// <summary> /// Create reply node for request/reply protocol /// </summary> /// <returns>The create.</returns> /// <param name="factory">Factory.</param> /// <param name="url">URL.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public static NngResult <IRepSocket> ReplierCreate <T>(this IAPIFactory <T> factory, string url) => factory.Listen(factory.ReplierOpen(), url);
/// <summary> /// Create surveyor socket for survey protocol /// </summary> /// <param name="factory"></param> /// <param name="url"></param> /// <param name="isListener"></param> /// <typeparam name="T"></typeparam> /// <returns></returns> public static NngResult <ISurveyorSocket> SurveyorCreate <T>(this IAPIFactory <T> factory, string url, bool isListener) => factory.DialOrListen(factory.SurveyorOpen(), url, isListener);
/// <summary> /// Create respondent socket for survey protocol /// </summary> /// <param name="factory"></param> /// <param name="url"></param> /// <param name="isListener"></param> /// <typeparam name="T"></typeparam> /// <returns></returns> public static NngResult <IRespondentSocket> RespondentCreate <T>(this IAPIFactory <T> factory, string url, bool isListener) => factory.DialOrListen(factory.RespondentOpen(), url, isListener);
/// <summary> /// Create pull node for push/pull protocol /// </summary> /// <returns>The create.</returns> /// <param name="factory">Factory.</param> /// <param name="url">URL.</param> /// <param name="isListener">If set to <c>true</c> is listener.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public static NngResult <IPullSocket> PullerCreate <T>(this IAPIFactory <T> factory, string url, bool isListener) => factory.DialOrListen(factory.PullerOpen(), url, isListener);
public static NngResult <ISendAsyncContext <T> > CreateAsyncContext <T>(this IPubSocket socket, IAPIFactory <T> factory) => factory.CreateSendAsyncContext(socket);
public LoginService(IAPIFactory aPIFactory, ICurrentlySelectedFactory currentlySelectedFactory) { this.aPIFactory = aPIFactory; this.currentlySelectedFactory = currentlySelectedFactory; }
public static NngResult <ISendReceiveAsyncContext <T> > CreateAsyncContext <T>(this IPairSocket socket, IAPIFactory <T> factory) => factory.CreateSendReceiveAsyncContext(socket, SendReceiveContextSubtype.Pair);
public PubSubBrokerImpl(IAPIFactory <IMessage> factory) { Factory = factory; topic = TopicRandom(); }
/// <summary> /// Create publish node for publish/subscribe protocol /// </summary> /// <returns>The create.</returns> /// <param name="factory">Factory.</param> /// <param name="url">URL.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public static NngResult <IPubSocket> PublisherCreate <T>(this IAPIFactory <T> factory, string url) => factory.Listen(factory.PublisherOpen(), url);
public PushPullBrokerImpl(IAPIFactory <IMessage> factory) { Factory = factory; }
public PushPullBrokerImpl(IAPIFactory <INngMsg> factory) { Factory = factory; }
public static NngResult <IRepReqAsyncContext <T> > CreateAsyncContext <T>(this IRepSocket socket, IAPIFactory <T> factory) => factory.CreateRepReqAsyncContext(socket);
public UserListViewComponent(IAPIFactory apiFactory) { _apiFactory = apiFactory; }
public static NngResult <ISurveyorAsyncContext <T> > CreateAsyncContext <T>(this ISurveyorSocket socket, IAPIFactory <T> factory) => factory.CreateSurveyorAsyncContext(socket);
public ComplexTests(NngCollectionFixture collectionFixture) { factory = collectionFixture.Factory; }