public void RemoveContinuousQueryListener <CQK, CQV>(Event.ContinuousQueryListener <CQK, CQV> cql) { stopAndRemoveTask(cql.clientEventListener.listenerId); VectorByte vc = new VectorByte(cql.clientEventListener.listenerId); cache.removeClientListener(vc); }
public VectorByte(VectorByte other) : this(PapillonPINVOKE.new_VectorByte__SWIG_1(VectorByte.getCPtr(other)), true) { if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } }
public void RemoveClientListener(ClientListener <K, V> cl) { stopAndRemoveTask(cl.listenerId); VectorByte vb = new VectorByte(cl.listenerId); cache.removeClientListener(vb); }
public PByteArray(VectorByte array) : this(PapillonPINVOKE.new_PByteArray__SWIG_3(VectorByte.getCPtr(array)), true) { if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } }
public VectorByteEnumerator(VectorByte collection) { collectionRef = collection; currentIndex = -1; currentObject = null; currentSize = collectionRef.Count; }
public void SetRange(int index, VectorByte values) { PapillonPINVOKE.VectorByte_SetRange(swigCPtr, index, VectorByte.getCPtr(values)); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } }
byte[] toByteArray(VectorByte v) { byte[] bytes = new byte[v.Count]; int i = 0; foreach (byte b in v) { bytes[i++] = b; } return(bytes); }
public static VectorByte Repeat(byte value, int count) { global::System.IntPtr cPtr = PapillonPINVOKE.VectorByte_Repeat(value, count); VectorByte ret = (cPtr == global::System.IntPtr.Zero) ? null : new VectorByte(cPtr, true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public VectorByte GetRange(int index, int count) { global::System.IntPtr cPtr = PapillonPINVOKE.VectorByte_GetRange(swigCPtr, index, count); VectorByte ret = (cPtr == global::System.IntPtr.Zero) ? null : new VectorByte(cPtr, true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public object Execute(string scriptName, IDictionary <string, Object> dict = null) { VectorMap vm = new VectorMap(); if (dict != null) { foreach (KeyValuePair <string, Object> p in dict) { VectorChar vcKey = toVectorChar(p.Key); VectorChar vcValue = toVectorChar(argMarshaller.ObjectToByteBuffer(p.Value)); vm.Add(vcKey, vcValue); } } VectorByte vb = cache.execute(scriptName, vm); byte[] ret = new byte[vb.Count]; vb.CopyTo(ret); return(argMarshaller.ObjectFromByteBuffer(ret)); }
public QueryResponse Query(QueryRequest qr) { uint size = (uint)qr.CalculateSize(); byte[] bytes = new byte[size]; CodedOutputStream cos = new CodedOutputStream(bytes); qr.WriteTo(cos); cos.Flush(); string s2 = System.Text.Encoding.ASCII.GetString(bytes); VectorByte vb = new VectorByte(bytes); VectorByte resp = cache.query(vb, size); byte[] respBytes = new byte[resp.Count]; resp.CopyTo(respBytes); QueryResponse queryResp = new QueryResponse(); return(QueryResponse.Parser.ParseFrom(respBytes)); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorByte obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }