GrowArrays() static private method

static private GrowArrays ( int oldSize ) : void
oldSize int
return void
Ejemplo n.º 1
0
        // Token: 0x060058CC RID: 22732 RVA: 0x0013836C File Offset: 0x0013656C
        internal static CrossAppDomainSink FindOrCreateSink(CrossAppDomainData xadData)
        {
            object             obj = CrossAppDomainSink.staticSyncObject;
            CrossAppDomainSink result;

            lock (obj)
            {
                int domainID = xadData.DomainID;
                if (CrossAppDomainSink._sinks == null)
                {
                    CrossAppDomainSink.GrowArrays(0);
                }
                int num = 0;
                while (CrossAppDomainSink._sinks[num] != null)
                {
                    if (CrossAppDomainSink._sinkKeys[num] == domainID)
                    {
                        return(CrossAppDomainSink._sinks[num]);
                    }
                    num++;
                    if (num == CrossAppDomainSink._sinks.Length)
                    {
                        CrossAppDomainSink.GrowArrays(num);
                        break;
                    }
                }
                CrossAppDomainSink._sinks[num]    = new CrossAppDomainSink(xadData);
                CrossAppDomainSink._sinkKeys[num] = domainID;
                result = CrossAppDomainSink._sinks[num];
            }
            return(result);
        }
Ejemplo n.º 2
0
 internal static CrossAppDomainSink FindOrCreateSink(CrossAppDomainData xadData)
 {
     lock (CrossAppDomainSink.staticSyncObject)
     {
         int local_2 = xadData.DomainID;
         if (CrossAppDomainSink._sinks == null)
         {
             CrossAppDomainSink.GrowArrays(0);
         }
         int local_3 = 0;
         while (CrossAppDomainSink._sinks[local_3] != null)
         {
             if (CrossAppDomainSink._sinkKeys[local_3] == local_2)
             {
                 return(CrossAppDomainSink._sinks[local_3]);
             }
             ++local_3;
             if (local_3 == CrossAppDomainSink._sinks.Length)
             {
                 CrossAppDomainSink.GrowArrays(local_3);
                 break;
             }
         }
         CrossAppDomainSink._sinks[local_3]    = new CrossAppDomainSink(xadData);
         CrossAppDomainSink._sinkKeys[local_3] = local_2;
         return(CrossAppDomainSink._sinks[local_3]);
     }
 }