Exemplo n.º 1
0
 internal override void Apply(NativeModifiers nModifier)
 {
     nModifier.timestamp = new NativeTimeWithNs
     {
         sec  = _timestamp.Second,
         nsec = _timestamp.Millisecond * MilliToNanoFactor
     };
 }
Exemplo n.º 2
0
        private NativeModifiers ToNativeModifiers(params Modifier[] modifiers)
        {
            var nativeModifiers = new NativeModifiers();

            foreach (var m in modifiers)
            {
                ((IModifier)m).Apply(nativeModifiers);
            }

            return(nativeModifiers);
        }
Exemplo n.º 3
0
        public static void FreeNativeModifiers(NativeModifiers nativeModifiers)
        {
            if (nativeModifiers.tagsToAdd != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(nativeModifiers.tagsToAdd);
            }

            if (nativeModifiers.tagsToRemove != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(nativeModifiers.tagsToRemove);
            }
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 internal static extern IntPtr /* NativeError */
 ctx_always_apply(string taskId, string ns, NativeModifiers nativeModifiers);
Exemplo n.º 7
0
 internal static extern IntPtr /* NativeError */
 ctx_add_metric(string taskId, string ns, NativeValue nativeValue, NativeModifiers nativeModifiers);
Exemplo n.º 8
0
 internal override void Apply(NativeModifiers nModifier)
 {
     nModifier.tagsToRemove = Convertions.DictionaryToNativeMapMem(_tags);
 }
Exemplo n.º 9
0
 internal abstract void Apply(NativeModifiers nModifier);
Exemplo n.º 10
0
 void IModifier.Apply(NativeModifiers nModifier)
 {
     Apply(nModifier);
 }
Exemplo n.º 11
0
 internal override void Apply(NativeModifiers nModifier)
 {
     nModifier.unit = _unit;
 }
Exemplo n.º 12
0
 internal override void Apply(NativeModifiers nModifier)
 {
     nModifier.description = _description;
 }