예제 #1
0
 /// <summary>
 /// Performs a look-up on the <see cref="CastExpression"/> to determine its
 /// dependencies.
 /// </summary>
 /// <param name="result">A <see cref="ITypeReferenceCollection"/> which
 /// relates to the <see cref="ITypeReference"/> instance implementations
 /// that the <see cref="CastExpression"/> relies on.</param>
 /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to
 /// guide the gathering process.</param>
 public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options)
 {
     if (this.target != null)
     {
         this.target.GatherTypeReferences(ref result, options);
     }
     if (this.type != null)
     {
         result.Add(this.type);
     }
 }
예제 #2
0
 /// <summary>
 /// Performs a look-up on the <see cref="EnumeratorStatement"/> to determine its
 /// dependencies.
 /// </summary>
 /// <param name="result">A <see cref="ITypeReferenceCollection"/> which
 /// relates to the <see cref="ITypeReference"/> instance implementations
 /// that the <see cref="EnumeratorStatement"/> relies on.</param>
 /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to
 /// guide the gathering process.</param>
 public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options)
 {
     base.GatherTypeReferences(ref result, options);
     if (this.currentMember != null)
     {
         this.currentMember.GatherTypeReferences(ref result, options);
     }
     if (this.currentMemberInit != null)
     {
         this.currentMemberInit.GatherTypeReferences(ref result, options);
     }
     if (this.enumeratorSource != null)
     {
         this.enumeratorSource.GatherTypeReferences(ref result, options);
     }
     if (this.enumMember != null)
     {
         this.enumMember.GatherTypeReferences(ref result, options);
     }
     if (this.itemType != null)
     {
         result.Add(this.ItemType);
     }
 }