Example #1
0
        public override bool Equals(object obj)
        {
            FixedArrayRef other = obj as FixedArrayRef;

            if (other == null)
            {
                return(false);
            }
            return(ArrayObj == other.ArrayObj &&
                   ((Indices == null && other.Indices == null) ||
                    (Indices != null && other.Indices != null && Indices.SequenceEqual(other.Indices))));
        }
Example #2
0
 /// <summary>
 /// Returns <c>true</c> if this reference may alias another fixed array reference.
 /// </summary>
 /// <param name="other">other fixed array reference</param>
 public bool MayAlias(FixedArrayRef other)
 {
     if (ArrayObj != other.ArrayObj)
     {
         return(false);
     }
     if (!IndicesConst || !other.IndicesConst)
     {
         return(true);
     }
     return(Indices.SequenceEqual(other.Indices));
 }
Example #3
0
 /// <summary>
 /// Returns <c>true</c> if this reference may alias another fixed array reference.
 /// </summary>
 /// <param name="other">other fixed array reference</param>
 public bool MayAlias(FixedArrayRef other)
 {
     if (ArrayObj != other.ArrayObj)
         return false;
     if (!IndicesConst || !other.IndicesConst)
         return true;
     return Indices.SequenceEqual(other.Indices);
 }
Example #4
0
            public MemoryMapperTransactionSite(InlineMemoryMapper mapper, Component host, FixedArrayRef array):
                base(host)
            {
                _mapper = mapper;
                _array = array;

                // work-around, since concept is currently not working: It is not possible to decide "on-the-fly" whether
                // write access is required or not, since transaction site needs to be established immediately.
                IndicateWriteAccess(true);
            }