hessiancsharp.io.CHessianOutput.AddRef C# (CSharp) Method

AddRef() public method

Adds an object to the reference list. If the object already exists, writes the reference, otherwise, the caller is responsible for the serialization R b32 b24 b16 b8
public AddRef ( object objReference ) : bool
objReference object the object to add as a reference
return bool
        public override bool AddRef(object objReference)
        {
            if (m_htRefs == null)
            {
                m_htRefs = new Dictionary<Object, Object>();
            }

            if (m_htRefs.ContainsKey(objReference))
            {
                int t_ref = (int) m_htRefs[objReference];
                int value = t_ref;
                WriteRef(value);
                return true;
            }
            else
            {
                m_htRefs.Add(objReference, m_htRefs.Count);
                return false;
            }
        }