The ClassScanner performs the reflective inspection of a class and extracts all the class level annotations. This will also extract the methods that are annotated. This ensures that the callback methods can be invoked during the deserialization process. Also, this will read the namespace annotations that are used.
コード例 #1
0
 /// <summary>
 /// Constructor for the <c>Scanner</c> object. This is used
 /// to scan the provided class for annotations that are used to
 /// build a schema for an XML file to follow.
 /// </summary>
 /// <param name="type">
 /// this is the type that is scanned for a schema
 /// </param>
 public Scanner(Class type)
 {
     this.scanner    = new ClassScanner(type);
     this.attributes = new LabelMap(this);
     this.elements   = new LabelMap(this);
     this.comparer   = new Comparer();
     this.type       = type;
     this.Scan(type);
 }
コード例 #2
0
ファイル: Scanner.cs プロジェクト: ngallagher/simplexml
 /// <summary>
 /// Constructor for the <c>Scanner</c> object. This is used
 /// to scan the provided class for annotations that are used to
 /// build a schema for an XML file to follow.
 /// </summary>
 /// <param name="type">
 /// this is the type that is scanned for a schema
 /// </param>
 public Scanner(Class type) {
    this.scanner = new ClassScanner(type);
    this.attributes = new LabelMap(this);
    this.elements = new LabelMap(this);
    this.comparer = new Comparer();
    this.type = type;
    this.Scan(type);
 }