예제 #1
0
            public void Swap(nint i, nint j)
            {
                if (s_SwapByRef is not null)
                {
                    s_SwapByRef.Invoke(ref this, i, j);
                    return;
                }

                if (s_SwapByVal is not null)
                {
                    s_SwapByVal.Invoke(this, i, j);
                    return;
                }

                if (Interface is not null)
                {
                    Interface.Swap(i, j);
                    return;
                }

                throw RuntimeErrorPanic.NilPointerDereference();
            }
예제 #2
0
 public bool Less(nint i, nint j) => s_LessByRef?.Invoke(ref this, i, j) ?? s_LessByVal?.Invoke(this, i, j) ?? Interface?.Less(i, j) ?? throw RuntimeErrorPanic.NilPointerDereference();
예제 #3
0
 public nint Len() => s_LenByRef?.Invoke(ref this) ?? s_LenByVal?.Invoke(this) ?? Interface?.Len() ?? throw RuntimeErrorPanic.NilPointerDereference();