Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new TypeSystemConvertVisitor and initializes it with a given context.
 /// </summary>
 /// <param name="parsedFile">The parsed file to which members should be added.</param>
 /// <param name="currentUsingScope">The current using scope.</param>
 /// <param name="currentTypeDefinition">The current type definition.</param>
 public TypeSystemConvertVisitor(ParsedFile parsedFile, UsingScope currentUsingScope = null, DefaultTypeDefinition currentTypeDefinition = null)
 {
     if (parsedFile == null)
     {
         throw new ArgumentNullException("parsedFile");
     }
     this.parsedFile            = parsedFile;
     this.usingScope            = currentUsingScope ?? parsedFile.RootUsingScope;
     this.currentTypeDefinition = currentTypeDefinition;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new TypeSystemConvertVisitor.
 /// </summary>
 /// <param name="pc">The parent project content (used as owner for the types being created).</param>
 /// <param name="fileName">The file name (used for DomRegions).</param>
 public TypeSystemConvertVisitor(IProjectContent pc, string fileName)
 {
     if (pc == null)
     {
         throw new ArgumentNullException("pc");
     }
     if (fileName == null)
     {
         throw new ArgumentNullException("fileName");
     }
     this.parsedFile = new ParsedFile(fileName, new UsingScope(pc));
     this.usingScope = parsedFile.RootUsingScope;
 }