Пример #1
0
        public virtual unsafe void Init(FuseOpt *opt, void *data, int offset)
        {
            opt->offset = (ulong)offset;
            opt->templ  = Marshal.StringToHGlobalAnsi(Template);

            Trace.WriteLine($"OptionInfo.Init: offset={offset}, templ={Template}@{opt->templ}");
        }
Пример #2
0
        public override unsafe void Init(FuseOpt *opt, void *data, int offset)
        {
            base.Init(opt, data, offset);

            opt->value = _value;

            *(int *)((byte *)data + offset) = _initialValue;
        }
        public override unsafe void Init(FuseOpt *opt, void *data, int offset)
        {
            base.Init(opt, data, offset);

            opt->value = 0;

            *(IntPtr *)((byte *)data + offset) = IntPtr.Zero;
        }
Пример #4
0
        public override unsafe void Process(FuseOpt *opt, void *data)
        {
            var value = *(int *)((byte *)data + opt->offset);

            if (value != 0)
            {
                _action(value);
            }
        }
        public override unsafe void Process(FuseOpt *opt, void *data)
        {
            var ptr = *(IntPtr *)((byte *)data + opt->offset);

            if (ptr != IntPtr.Zero)
            {
                var str = Marshal.PtrToStringAnsi(ptr);
                _action(str);
            }
        }
        public override unsafe void Release(FuseOpt *opt, void *data)
        {
            var ptr = *(IntPtr *)((byte *)data + opt->offset);

            if (ptr != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(ptr);
            }

            base.Release(opt, data);
        }
Пример #7
0
 internal static extern unsafe int FuseOptParse(FuseArgs *args, void *data, FuseOpt *opts, FuseOptProc proc);
Пример #8
0
 public virtual unsafe void Release(FuseOpt *opt, void *data)
 {
     Marshal.FreeHGlobal(opt->templ);
     Trace.WriteLine($"OptionInfo.Release: templ@{opt->templ}");
 }
Пример #9
0
 public abstract unsafe void Process(FuseOpt *opt, void *data);