internal override void Apply(NativeModifiers nModifier) { nModifier.timestamp = new NativeTimeWithNs { sec = _timestamp.Second, nsec = _timestamp.Millisecond * MilliToNanoFactor }; }
private NativeModifiers ToNativeModifiers(params Modifier[] modifiers) { var nativeModifiers = new NativeModifiers(); foreach (var m in modifiers) { ((IModifier)m).Apply(nativeModifiers); } return(nativeModifiers); }
public static void FreeNativeModifiers(NativeModifiers nativeModifiers) { if (nativeModifiers.tagsToAdd != IntPtr.Zero) { Marshal.FreeHGlobal(nativeModifiers.tagsToAdd); } if (nativeModifiers.tagsToRemove != IntPtr.Zero) { Marshal.FreeHGlobal(nativeModifiers.tagsToRemove); } }
internal static IntPtr /* NativeError */ ctx_always_apply(string taskId, string ns, NativeModifiers nativeModifiers) { if (IsWindows()) { return(CBridgeWin.ctx_always_apply(taskId, ns, nativeModifiers)); } if (IsLinux()) { return(CBridgeLinux.ctx_always_apply(taskId, ns, nativeModifiers)); } throw new NotImplementedException(NoImplementedError); }
internal static IntPtr /* NativeError */ ctx_add_metric(string taskId, string ns, NativeValue nativeValue, NativeModifiers nativeModifiers) { if (IsWindows()) { return(CBridgeWin.ctx_add_metric(taskId, ns, nativeValue, nativeModifiers)); } if (IsLinux()) { return(CBridgeLinux.ctx_add_metric(taskId, ns, nativeValue, nativeModifiers)); } throw new NotImplementedException(NoImplementedError); }
internal static extern IntPtr /* NativeError */ ctx_always_apply(string taskId, string ns, NativeModifiers nativeModifiers);
internal static extern IntPtr /* NativeError */ ctx_add_metric(string taskId, string ns, NativeValue nativeValue, NativeModifiers nativeModifiers);
internal override void Apply(NativeModifiers nModifier) { nModifier.tagsToRemove = Convertions.DictionaryToNativeMapMem(_tags); }
internal abstract void Apply(NativeModifiers nModifier);
void IModifier.Apply(NativeModifiers nModifier) { Apply(nModifier); }
internal override void Apply(NativeModifiers nModifier) { nModifier.unit = _unit; }
internal override void Apply(NativeModifiers nModifier) { nModifier.description = _description; }