Exemplo n.º 1
0
 /// <summary>
 /// Retrieves the <see cref="ILVariable"/> associated with this <see cref="ForeachStatement"/>,
 /// or <c>null</c> if no variable is associated with this foreach statement.
 /// </summary>
 public static ILVariable GetILVariable(this ForeachStatement loop)
 {
     if (loop.Annotation <ResolveResult>() is ILVariableResolveResult rr)
     {
         return(rr.Variable);
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Retrieves the <see cref="ILVariable"/> associated with this <see cref="ForeachStatement"/>, or <c>null</c> if no variable is associated with this foreach statement.
        /// </summary>
        public static ILVariable GetILVariable(this ForeachStatement loop)
        {
            var rr = loop.Annotation <ResolveResult>() as ILVariableResolveResult;

            if (rr != null)
            {
                return(rr.Variable);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 3
0
 public static ILVariable GetILVariable(this ForeachStatement loop)
 {
     return(loop.Annotation <ILVariable>());
 }