/// <summary> /// <para>Specifies deputy, transcripts of whose speeches should be looked up.</para> /// </summary> /// <param name="call">API call instance to use.</param> /// <param name="deputy">Subject deputy.</param> /// <returns>Back reference to the provided <paramref name="call"/> instance.</returns> /// <exception cref="ArgumentNullException">If either <paramref name="call"/> or <paramref name="deputy"/> is a <c>null</c> reference.</exception> public static IDeputyTranscriptLawApiCall Deputy(this IDeputyTranscriptLawApiCall call, IDeputy deputy) { Assertion.NotNull(call); Assertion.NotNull(deputy); return call.Deputy(deputy.Id); }
/// <summary> /// <para></para> /// </summary> /// <param name="call"></param> /// <param name="deputy"></param> /// <returns>Back reference to the provided <paramref name="call"/> instance.</returns> /// <exception cref="ArgumentNullException">If either <paramref name="call"/> or <paramref name="deputy"/> is a <c>null</c> reference.</exception> public static IVotesSearchLawApiCall Deputy(this IVotesSearchLawApiCall call, IDeputy deputy) { Assertion.NotNull(call); Assertion.NotNull(deputy); return call.Deputy(deputy.Id); }
public QuickLabor(int laborersCount, int evokerCount, bool safeClose, IDeputy method, IDeputy evoker) { LaborMethods _ant = new LaborMethods(); _ant.Put(method); _ant.Put(evoker); Lab = new Laboratory(_ant); Lab.Scope["Primary"].LaborersCount = laborersCount; Lab.RunLaborators(); Subject = Lab.Scope["Primary"]; Visor = Subject.Visor; Laborer = Subject.Labors.AsValues().ElementAt(0).Laborer; Laborer.AddEvoker(Subject.Labors.AsCards().Skip(1).First().Value); Lab.Elaborate(method.Info.Name, method.ParameterValues); Subject.Visor.Close(safeClose); }
/// <summary> /// The Start. /// </summary> /// <param name="ServerIdentity">The ServerIdentity<see cref="MemberIdentity"/>.</param> /// <param name="security">The security<see cref="IMemberSecurity"/>.</param> /// <param name="OnEchoEvent">The OnEchoEvent<see cref="IDeputy"/>.</param> public void Start(MemberIdentity ServerIdentity, IMemberSecurity security = null, IDeputy OnEchoEvent = null) { server = DealListener.Instance; server.Identity = ServerIdentity; Security = security; new Thread(new ThreadStart(server.StartListening)).Start(); server.HeaderSent = new DealEvent("HeaderSent", this); server.MessageSent = new DealEvent("MessageSent", this); server.HeaderReceived = new DealEvent("HeaderReceived", this); server.MessageReceived = new DealEvent("MessageReceived", this); server.SendEcho = OnEchoEvent; WriteEcho("Dealer instance started"); }
public DeallogWriter(IDeputy writeevent) { writer = writeevent; }
/// <summary> /// Initializes a new instance of the <see cref="LogHandler"/> class. /// </summary> /// <param name="writeMethod">The writeMethod<see cref="IDeputy"/>.</param> /// <param name="cleanMethod">The cleanMethod<see cref="IDeputy"/>.</param> public LogHandler(IDeputy writeMethod, IDeputy cleanMethod = null) { writer = writeMethod; cleaner = cleanMethod; }
/// <summary> /// Initializes a new instance of the <see cref="DealConnection"/> class. /// </summary> /// <param name="ClientIdentity">The ClientIdentity<see cref="MemberIdentity"/>.</param> /// <param name="OnCompleteEvent">The OnCompleteEvent<see cref="IDeputy"/>.</param> /// <param name="OnEchoEvent">The OnEchoEvent<see cref="IDeputy"/>.</param> public DealConnection(MemberIdentity ClientIdentity, IDeputy OnCompleteEvent = null, IDeputy OnEchoEvent = null) { MemberIdentity ci = ClientIdentity; ci.Site = ServiceSite.Client; DealClient client = new DealClient(ci); Transfer = new DealTransfer(ci); connected = new DealEvent("Connected", this); headerSent = new DealEvent("HeaderSent", this); messageSent = new DealEvent("MessageSent", this); headerReceived = new DealEvent("HeaderReceived", this); messageReceived = new DealEvent("MessageReceived", this); client.Connected = connected; client.HeaderSent = headerSent; client.MessageSent = messageSent; client.HeaderReceived = headerReceived; client.MessageReceived = messageReceived; CompleteEvent = OnCompleteEvent; EchoEvent = OnEchoEvent; Client = client; WriteEcho("Client Connection Created"); }
/// <summary> /// The SetCallback. /// </summary> /// <param name="methodName">The methodName<see cref="string"/>.</param> /// <param name="classObject">The classObject<see cref="object"/>.</param> public void SetCallback(string methodName, object classObject) { CompleteEvent = new DealEvent(methodName, classObject); }
/// <summary> /// The SetCallback. /// </summary> /// <param name="OnCompleteEvent">The OnCompleteEvent<see cref="IDeputy"/>.</param> public void SetCallback(IDeputy OnCompleteEvent) { CompleteEvent = OnCompleteEvent; }
/// <summary> /// The CreateHandler. /// </summary> /// <param name="writeEvent">The writeEvent<see cref="IDeputy"/>.</param> /// <param name="cleanEvent">The cleanEvent<see cref="IDeputy"/>.</param> public static void CreateHandler(IDeputy writeEvent, IDeputy cleanEvent = null) { handler = new LogHandler(writeEvent, cleanEvent); }