Equals() публичный Метод

public Equals ( byte obj ) : bool
obj byte
Результат bool
    public bool PosTest1()
    {
        bool retVal = true;

        UnicodeEncoding uE = new UnicodeEncoding(true,false);

        Byte[] expectedValue = new Byte[] { };
        Byte[] actualValue;

        TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method with bigEndian true and byteOrderMark false.");
        try
        {
            actualValue = uE.GetPreamble();

            if (expectedValue.Equals(actualValue))
            {
                TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
                retVal = false;
            }

        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
            retVal = false;
        }
        return retVal;
    }
Пример #2
0
    static int Equals(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(byte), typeof(byte)))
            {
                System.Byte obj  = (System.Byte)ToLua.ToObject(L, 1);
                byte        arg0 = (byte)LuaDLL.lua_tonumber(L, 2);
                bool        o    = obj.Equals(arg0);
                LuaDLL.lua_pushboolean(L, o);
                ToLua.SetBack(L, 1, obj);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(byte), typeof(object)))
            {
                System.Byte obj  = (System.Byte)ToLua.ToObject(L, 1);
                object      arg0 = ToLua.ToVarObject(L, 2);
                bool        o    = obj.Equals(arg0);
                LuaDLL.lua_pushboolean(L, o);
                ToLua.SetBack(L, 1, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: System.Byte.Equals"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Пример #3
0
        public override bool Equals(IRosMessage ____other)
        {
            if (____other == null)
            {
                return(false);
            }
            bool  ret   = true;
            RawRC other = (RawRC)____other;

            ret &= header == other.header;
            ret &= status.Equals(other.status);
            ret &= channel.Equals(other.channel);
            return(ret);
        }
Пример #4
0
        static StackObject *Equals_4(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Byte obj = (byte)ptr_of_this_method->Value;
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Byte instance_of_this_method = GetInstance(__domain, ptr_of_this_method, __mStack);

            var result_of_this_method = instance_of_this_method.Equals(obj);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }