Ejemplo n.º 1
0
 /// <summary>
 /// Checks to see whether the data member
 /// <see cref="classes"/> is initialized
 /// to its default state.
 /// </summary>
 private void CheckClasses()
 {
     if (this.classes == null)
     {
         this.classes = this.InitializeClasses();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Checks to see whether the data member
 /// <see cref="classes"/> is initialized
 /// to its default state.
 /// </summary>
 private void CheckClasses()
 {
     lock (SyncObject)
         if (this.classes == null)
         {
             if (this.IsDisposed)
             {
                 throw new InvalidOperationException(Resources.ObjectStateThrowMessage);
             }
             else
             {
                 this.classes = this.InitializeClasses();
             }
         }
 }
Ejemplo n.º 3
0
 public override void Dispose()
 {
     if (this.IsDisposed)
     {
         return;
     }
     try
     {
         lock (SyncObject)
         {
             if (this.classes != null)
             {
                 this.classes.Dispose();
                 this.classes = null;
             }
             if (this.delegates != null)
             {
                 this.delegates.Dispose();
                 this.delegates = null;
             }
             if (this.enums != null)
             {
                 this.enums.Dispose();
                 this.enums = null;
             }
             if (this.interfaces != null)
             {
                 this.interfaces.Dispose();
                 this.interfaces = null;
             }
             if (this.structs != null)
             {
                 this.structs.Dispose();
                 this.structs = null;
             }
             if (this.types != null)
             {
                 this.types = null;
             }
             if (this.binaryOperatorCoercions != null)
             {
                 this.binaryOperatorCoercions.Dispose();
                 this.binaryOperatorCoercions = null;
             }
             if (this.typeInitializer != null)
             {
                 this.typeInitializer.Dispose();
                 this.typeInitializer = null;
             }
             if (this.constructors != null)
             {
                 this.constructors.Dispose();
                 this.constructors = null;
             }
             if (this.methods != null)
             {
                 this.methods.Dispose();
                 this.methods = null;
             }
             if (this.events != null)
             {
                 this.events.Dispose();
                 this.events = null;
             }
             if (this.fields != null)
             {
                 this.fields.Dispose();
                 this.fields = null;
             }
             if (this.indexers != null)
             {
                 this.indexers.Dispose();
                 this.indexers = null;
             }
             if (this.properties != null)
             {
                 this.properties.Dispose();
                 this.properties = null;
             }
             if (this.typeCoercions != null)
             {
                 this.typeCoercions.Dispose();
                 this.typeCoercions = null;
             }
             if (this.unaryOperatorCoercions != null)
             {
                 this.unaryOperatorCoercions.Dispose();
                 this.unaryOperatorCoercions = null;
             }
             if (this._members != null)
             {
                 this._members = null;
             }
             fullTypesChecked = true;
         }
     }
     finally
     {
         base.Dispose();
     }
 }