Exemplo n.º 1
0
 public ResolvedUsingScope(VSharpTypeResolveContext context, UsingScope usingScope)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (usingScope == null)
     {
         throw new ArgumentNullException("usingScope");
     }
     this.parentContext = context;
     this.usingScope    = usingScope;
     if (usingScope.Parent != null)
     {
         if (context.CurrentUsingScope == null)
         {
             throw new InvalidOperationException();
         }
     }
     else
     {
         if (context.CurrentUsingScope != null)
         {
             throw new InvalidOperationException();
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new nested using scope.
 /// </summary>
 /// <param name="parent">The parent using scope.</param>
 /// <param name="shortName">The short namespace name.</param>
 public UsingScope(UsingScope parent, string shortName)
 {
     if (parent == null)
     {
         throw new ArgumentNullException("parent");
     }
     if (shortName == null)
     {
         throw new ArgumentNullException("shortName");
     }
     this.parent    = parent;
     this.shortName = shortName;
 }