예제 #1
0
        /// <summary>
        /// Returns a "live" System.Type object that provides reflective access to the referenced typeBuilder.
        /// If the typeBuilder cannot be found or cannot be loaded, the result is null.
        /// </summary>
        public Type /*?*/ GetType(ITypeReference /*?*/ type)
        {
            if (type == null)
            {
                return(null);
            }
            var result = this.typeMap.Find(type.InternedKey);

            if (result == null)
            {
                type.DispatchAsReference(this.mappingVisitor);
                result = this.mappingVisitor.result;
                this.typeMap.Add(type.InternedKey, result);
            }
            return(result);
        }
예제 #2
0
 /// <summary>
 /// Traverses the specified type reference.
 /// </summary>
 public void Traverse(ITypeReference typeReference)
 {
     Contract.Requires(typeReference != null);
       typeReference.DispatchAsReference(this.dispatchingVisitor);
 }
예제 #3
0
 /// <summary>
 /// Returns a "live" System.Type object that provides reflective access to the referenced typeBuilder.
 /// If the typeBuilder cannot be found or cannot be loaded, the result is null.
 /// </summary>
 public Type/*?*/ GetType(ITypeReference/*?*/ type) {
   if (type == null) return null;
   var result = this.typeMap.Find(type.InternedKey);
   if (result == null) {
     type.DispatchAsReference(this.mappingVisitor);
     result = this.mappingVisitor.result;
     this.typeMap.Add(type.InternedKey, result);
   }
   return result;
 }
예제 #4
0
 /// <summary>
 /// Traverses the specified type reference.
 /// </summary>
 public void Traverse(ITypeReference typeReference)
 {
     typeReference.DispatchAsReference(this.dispatchingVisitor);
 }