예제 #1
0
        public void FunctionRun()
        {
            switch (Function)
            {
            case EFunction.Rev:
            {
                if (Rop.GetType().GetMethod("Rev")?.Invoke(Rop, null) == null)
                {
                    Rop = 1 / (dynamic)Rop;
                }
                else
                {
                    Rop = (T)Rop.GetType().GetMethod("Rev")?.Invoke(Rop, null);
                }
                break;
            }

            case EFunction.Sqr:
            {
                if (Rop.GetType().GetMethod("Sqr")?.Invoke(Rop, null) == null)
                {
                    Rop = (dynamic)Rop * (dynamic)Rop;
                }
                else
                {
                    Rop = (T)Rop.GetType().GetMethod("Sqr")?.Invoke(Rop, null);
                }
                break;
            }
            }
        }
예제 #2
0
        public T RetTRop()
        {
            object str = Rop.GetType().GetMethod("Copy")?.Invoke(null, new object[] { Rop }) ?? Rop;

            return((T)str);
        }
예제 #3
0
        public string RetRop()
        {
            object str = Rop.GetType().GetMethod("Show")?.Invoke(Rop, null) ?? Rop;

            return(str.ToString());
        }