public unsafe void ProduceWindowWithSpan(Int64 previousTicks) { var span = new Span <Int64>(Shared.ToPointer(), WindowSize); span.Fill(previousTicks); OnDataReady?.Invoke(WindowSize); }
public void ProduceWindowManaged(Int64 previousTicks) { for (int i = 0; i < WindowSize; i += 8) { Marshal.WriteInt64(Shared, i, previousTicks); } OnDataReady?.Invoke(WindowSize); }
public unsafe void ProduceWindowUnsafe(Int64 previousTicks) { var p = (Int64 *)Shared.ToPointer(); for (int i = 0; i < WindowSize; i++) { *p++ = previousTicks; } OnDataReady?.Invoke(WindowSize); }
/// <summary>Sends the request off and defines a callback to run when the result is ready.</summary> /// <param name="ready">The callback to run. /// Note that the callback must check if the result is Ok.</param> public void Get(OnDataReady ready){ Ready+=ready; if(string.IsNullOrEmpty(Url)){ GotData(null,"Empty path!"); return; } // Do we have a file protocol handler available? FileProtocol fileProtocol=File.Handler; if(fileProtocol!=null){ fileProtocol.OnGetData(this,File); } }
/// <summary>Sends the request off and defines a callback to run when the result is ready.</summary> /// <param name="ready">The callback to run. /// Note that the callback must check if the result is Ok.</param> public void Get(OnDataReady ready) { Ready += ready; if (string.IsNullOrEmpty(Url)) { GotData(null, "Empty path!"); return; } // Do we have a file protocol handler available? FileProtocol fileProtocol = File.Handler; if (fileProtocol != null) { fileProtocol.OnGetData(this, File); } }
protected virtual void TriggerDataReadyEvent() { OnDataReady?.Invoke(Data, this); }