private void Check_Types()
 {
     lock (this.SyncObject)
         if (this.types == null)
         {
             if (this.IsDisposed)
             {
                 throw new InvalidOperationException(Resources.ObjectStateThrowMessage);
             }
             this.types = this.InitializeTypes();
         }
 }
 /// <summary>
 /// Frees managed resources used by the
 /// <see cref="IntermediateGenericSegmentableParentType{TTypeIdentifier, TType, TIntermediateType, TInstanceIntermediateType}"/>.
 /// </summary>
 public override void Dispose()
 {
     try
     {
         if (this.classes != null)
         {
             this.classes.Dispose();
             this.classes = null;
         }
         if (this.enums != null)
         {
             this.enums.Dispose();
             this.enums = null;
         }
         if (this.delegates != null)
         {
             this.delegates.Dispose();
             this.delegates = 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)
         {
             if (this.IsRoot)
             {
                 this.types.Dispose();
             }
             else
             {
                 this.types.ConditionalRemove(this);
             }
             this.types = null;
         }
         if (this.scopeCoercions != null)
         {
             this.scopeCoercions = null;
         }
     }
     finally
     {
         base.Dispose();
     }
 }
Beispiel #3
0
 public IntermediateTypeDictionary(IIntermediateTypeParent parent, IntermediateFullTypeDictionary master, IntermediateTypeDictionary <TTypeIdentifier, TType, TIntermediateType> root)
     : base(master, root)
 {
     this.parent = parent;
 }
Beispiel #4
0
 public IntermediateTypeDictionary(IIntermediateTypeParent parent, IntermediateFullTypeDictionary master)
     : base(master)
 {
     this.parent = parent;
 }
Beispiel #5
0
 public IntermediateInterfaceTypeDictionary(IIntermediateTypeParent parent, IntermediateFullTypeDictionary master, IntermediateInterfaceTypeDictionary root)
     : base(parent, master, root)
 {
 }
Beispiel #6
0
 /// <summary>
 /// Disposes the <see cref="IntermediateNamespaceDeclaration"/>
 /// </summary>
 /// <param name="disposing">whether to dispose the managed
 /// resources as well as the unmanaged resources.</param>
 protected override void Dispose(bool disposing)
 {
     try
     {
         if (disposing)
         {
             lock (this.SyncObject)
             {
                 this.parent = null;
                 if (this.methods != null)
                 {
                     this.methods.Dispose();
                     this.methods = null;
                 }
                 if (this.fields != null)
                 {
                     this.fields.Dispose();
                     this.fields = null;
                 }
                 if (this.members != null)
                 {
                     if (this.IsRoot)
                     {
                         this.members.Dispose();
                     }
                     else
                     {
                         this.members.ConditionalRemove(this);
                     }
                     this.members = null;
                 }
                 if (this.classes != null)
                 {
                     this.classes.Dispose();
                     this.classes = null;
                 }
                 if (this.enums != null)
                 {
                     this.enums.Dispose();
                     this.enums = null;
                 }
                 if (this.delegates != null)
                 {
                     this.delegates.Dispose();
                     this.delegates = 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)
                 {
                     if (this.IsRoot)
                     {
                         this.types.Dispose();
                     }
                     else
                     {
                         this.types.ConditionalRemove(this);
                     }
                     this.types = null;
                 }
                 if (this.namespaces != null)
                 {
                     this.namespaces.Dispose();
                     this.namespaces = null;
                 }
                 this.scopeCoercions = null;
             }
         }
     }
     finally
     {
         base.Dispose(disposing);
     }
 }
Beispiel #7
0
 public IntermediateDelegateTypeDictionary(IIntermediateTypeParent parent, IntermediateFullTypeDictionary master)
     : base(parent, master)
 {
 }
Beispiel #8
0
 /// <summary>
 /// Creates a new <see cref="IntermediateFullTypeDictionary"/> with the
 /// <paramref name="root"/> set provided.
 /// </summary>
 public IntermediateFullTypeDictionary(IIntermediateTypeParent parent, IntermediateFullTypeDictionary root)
     : base(root)
 {
     this.Parent = parent;
 }
Beispiel #9
0
 public IntermediateGenericTypeDictionary(IIntermediateTypeParent parent, IntermediateFullTypeDictionary master, IntermediateGenericTypeDictionary <TTypeIdentifier, TType, TIntermediateType> root)
     : base(parent, master, root)
 {
 }