Example #1
0
        /// <summary>
        /// test if is equal to other object.
        /// </summary>
        /// <param name="obj">object to compare</param>
        /// <returns>true if both are equal</returns>
        public override bool Equals(object obj)
        {
            //if parameter is null return false
            if (obj == null)
            {
                return(false);
            }

            //if parameter cannot be cast to Guid return false
            LASGuid guidd = obj as LASGuid;

            if ((object)guidd == null)
            {
                return(false);
            }

            if (CAPI.LASGuid_Equals(hguid, guidd.GetPointer()) == 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #2
0
        public void Equals()
        {
            LASGuid guid1 = new LASGuid("3F2504E0-4F89-11D3-9A0C-0305E82C3301");
            LASGuid guid2 = new LASGuid("3F2504E0-4F89-11D3-9A0C-0305E82C3301");

            Assert.IsTrue(guid1.Equals(guid2));
        }
Example #3
0
        public void ConstructionfromString()
        {
            LASGuid guid1 = new LASGuid("00000000-0000-0000-0000-000000000000");

            LASGuid guid2 = new LASGuid("3F2504E0-4F89-11D3-9A0C-0305E82C3301");

            Assert.AreNotSame(guid1, guid2);
            Assert.AreEqual(guid1.ToString(), "00000000-0000-0000-0000-000000000000");
            Assert.AreEqual(guid2.ToString().ToUpper(), "3F2504E0-4F89-11D3-9A0C-0305E82C3301");
            Assert.IsNotNull(guid1);
            Assert.IsNotNull(guid2);
        }
Example #4
0
        /// <summary>
        /// test if is equal to other LASGuid.
        /// </summary>
        /// <param name="obj">LASGuid to compare</param>
        /// <returns>true if both are equal</returns>
        public bool Equals(LASGuid obj)
        {
            //if parameter cannot be cast to Guid return false

            if ((object)obj == null)
            {
                return(false);
            }

            if (CAPI.LASGuid_Equals(hguid, obj.GetPointer()) == 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #5
0
        /// <summary>
        /// test if is equal to other LASGuid.
        /// </summary>
        /// <param name="obj">LASGuid to compare</param>
        /// <returns>true if both are equal</returns>
        public bool Equals(LASGuid obj)
        {
            //if parameter cannot be cast to Guid return false

            if ((object)obj == null)
            {
                return false;
            }

            if (NativeMethods.LASGuid_Equals(hguid, obj.GetPointer()) == 1)
            {
                return true;
            }
            else
            {
                return false;
            }
        }