public UserLogRecordHandler(Action <RRLogRecord> handler) { UserLogRecordHandlerDirectorNET director = new UserLogRecordHandlerDirectorNET(handler); int id = RRObjectHeap.AddObject(director); _SetHandler(director, id); }
internal PipeSubscription(WrappedPipeSubscription subscription) { _subscription = subscription; var director = new WrappedPipeSubscriptionDirectorNET(this); int id = RRObjectHeap.AddObject(director); subscription.SetRRDirector(director, id); }
public async Task <object> AsyncGetDefaultClient(int timeout = -1) { AsyncStubReturnDirectorImpl <object> h = new AsyncStubReturnDirectorImpl <object>(null); int id = RRObjectHeap.AddObject(h); _subscription.AsyncGetDefaultClient(timeout, h, id); return(await h.Task); }
public async Task AsyncClose(int timeout = RobotRaconteurNode.RR_TIMEOUT_INFINITE) { AsyncVoidReturnDirectorImpl h = new AsyncVoidReturnDirectorImpl(); int id = RRObjectHeap.AddObject(h); inner_gen.AsyncClose(timeout, h, id); await h.Task; }
private WrappedServiceSubscriptionFilter SubscribeService_LoadFilter(ServiceSubscriptionFilter filter) { WrappedServiceSubscriptionFilter filter2 = null; if (filter != null) { filter2 = new WrappedServiceSubscriptionFilter(); if (filter.ServiceNames != null) { foreach (string s in filter.ServiceNames) { filter2.ServiceNames.Add(s); } } if (filter.TransportSchemes != null) { foreach (string s in filter.TransportSchemes) { filter2.TransportSchemes.Add(s); } } filter2.MaxConnections = filter.MaxConnections; if (filter.Nodes != null) { var nodes2 = new vectorptr_wrappedservicesubscriptionnode(); foreach (var n1 in filter.Nodes) { if (n1 == null) { continue; } var n2 = new WrappedServiceSubscriptionFilterNode(); n2.NodeID = n1.NodeID ?? NodeID.GetAny(); n2.NodeName = n1.NodeName ?? ""; n2.Username = n1.Username ?? ""; if (n1.Credentials != null) { n2.Credentials = (MessageElementData)this.PackMapType <string, object>(n1.Credentials); } nodes2.Add(n2); } filter2.Nodes = nodes2; } if (filter.Predicate != null) { var director = new WrappedServiceSubscriptionFilterPredicateDirectorNET(filter.Predicate); int id = RRObjectHeap.AddObject(director); filter2.SetRRPredicateDirector(director, id); } } return(filter2); }
private static WallTimer_initstruct AttachHandler(Action <TimerEvent> handler) { WallTimer_initstruct s = new WallTimer_initstruct(); AsyncTimerEventReturnDirectorImpl h = new AsyncTimerEventReturnDirectorImpl(handler); s.handler = h; s.id = RRObjectHeap.AddObject(h); return(s); }
public WrappedGenerator3ServerDirectorNET(Generator3 <ParamType> generator) { if (generator == null) { throw new NullReferenceException("Generator must not be null"); } this.generator = generator; this.objectheapid = RRObjectHeap.AddObject(this); }
public async Task AsyncNext(ParamType param, int timeout = RobotRaconteurNode.RR_TIMEOUT_INFINITE) { using (MessageElement m = RobotRaconteurNode.s.PackAnyType <ParamType>("parameter", ref param)) { AsyncRequestDirectorImpl d = new AsyncRequestDirectorImpl(); int id = RRObjectHeap.AddObject(d); inner_gen.AsyncNext(m, timeout, d, id); var mret = await d.Task; } }
public async Task <ReturnType> AsyncNext(int timeout = RobotRaconteurNode.RR_TIMEOUT_INFINITE) { AsyncRequestDirectorImpl d = new AsyncRequestDirectorImpl(); int id = RRObjectHeap.AddObject(d); inner_gen.AsyncNext(null, timeout, d, id); var mret = await d.Task; return(RobotRaconteurNode.s.UnpackAnyType <ReturnType>(mret)); }
//public int memoryid = 0; public WrappedPodMultiDimArrayMemoryDirectorNET(PodMultiDimArrayMemory <T> mem) { this.mem = mem; this.objectheapid = RRObjectHeap.AddObject(this); }
//public int memoryid = 0; public WrappedNamedArrayMemoryDirectorNET(NamedArrayMemory <T> mem) { this.mem = mem; this.objectheapid = RRObjectHeap.AddObject(this); }