Ejemplo n.º 1
0
 /// <inheritdoc/>
 public void Dispose()
 {
     if (ownReader && reader != null)
     {
         reader.Dispose();
     }
 }
Ejemplo n.º 2
0
 /// <inheritdoc/>
 public void Dispose()
 {
     if (reader != null)
     {
         reader.Dispose();
     }
 }
Ejemplo n.º 3
0
        /// <inheritdoc/>
        protected override void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }
#if THREAD_SAFE
            theLock.EnterWriteLock(); try {
#endif
            if (dataReader != null)
            {
                dataReader.Dispose();
            }
            if (rsrcReader != null)
            {
                rsrcReader.Dispose();
            }
            dataReader = null;
            rsrcReader = null;
#if THREAD_SAFE
        }

        finally { theLock.ExitWriteLock(); }
#endif
            base.Dispose(disposing);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Gets the binary custom attribute data that was used to create this instance.
        /// </summary>
        /// <returns>Blob of this custom attribute</returns>
        public byte[] GetBlob()
        {
            if (rawData != null)
            {
                return(rawData);
            }
            if (blob != null)
            {
                return(blob);
            }
#if THREAD_SAFE
            if (blobReader != null)
            {
                lock (this) {
#endif
            if (blobReader != null)
            {
                blob = blobReader.ReadAllBytes();
                blobReader.Dispose();
                blobReader = null;
                return(blob);
            }
#if THREAD_SAFE
        }
    }
#endif
            if (blob != null)
            {
                return(blob);
            }
            return(blob = new byte[0]);
        }
 /// <inheritdoc/>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (ownsReader && reader != null)
         {
             reader.Dispose();
         }
         reader = null;
     }
     base.Dispose(disposing);
 }
Ejemplo n.º 6
0
 /// <inheritdoc/>
 protected override void Dispose(bool disposing)
 {
     if (!disposing)
     {
         return;
     }
     if (dataReader != null)
     {
         dataReader.Dispose();
     }
     if (rsrcReader != null)
     {
         rsrcReader.Dispose();
     }
     dataReader = null;
     rsrcReader = null;
     base.Dispose(disposing);
 }
 public void Dispose()
 {
     reader.Dispose();
 }