示例#1
0
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit(this);
 }
示例#2
0
 void Cci.IMetadataExpression.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit(this);
 }
示例#3
0
 public void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IMethodReference)this);
 }
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     if (((Cci.IMethodReference)this).AsGenericMethodInstanceReference != null)
     {
         visitor.Visit((Cci.IGenericMethodInstanceReference)this);
     }
     else if (((Cci.IMethodReference)this).AsSpecializedMethodReference != null)
     {
         visitor.Visit((Cci.ISpecializedMethodReference)this);
     }
     else
     {
         visitor.Visit((Cci.IMethodReference)this);
     }
 }
示例#5
0
文件: VtblGap.cs 项目: pheede/roslyn
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IMethodDefinition)this);
 }
示例#6
0
        void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
        {
            Debug.Assert(this.IsDefinitionOrDistinct());

            if (!this.IsDefinition)
            {
                visitor.Visit((Cci.ISpecializedFieldReference)this);
            }
            else if (object.ReferenceEquals(this.ContainingModule, ((PEModuleBuilder)visitor.Context.Module).SourceModule))
            {
                visitor.Visit((Cci.IFieldDefinition)this);
            }
            else
            {
                visitor.Visit((Cci.IFieldReference)this);
            }
        }
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IArrayTypeReference)this);
 }
示例#8
0
 public virtual void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IModule)this);
 }
示例#9
0
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IAssemblyReference)this);
 }
示例#10
0
        void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
        {
            Debug.Assert(this.IsDefinitionOrDistinct());

            if (!this.IsDefinition)
            {
                if (this.IsGenericMethod)
                {
                    Debug.Assert(((Cci.IMethodReference)this).AsGenericMethodInstanceReference != null);
                    visitor.Visit((Cci.IGenericMethodInstanceReference)this);
                }
                else
                {
                    Debug.Assert(((Cci.IMethodReference)this).AsSpecializedMethodReference != null);
                    visitor.Visit((Cci.ISpecializedMethodReference)this);
                }
            }
            else
            {
                PEModuleBuilder moduleBeingBuilt = (PEModuleBuilder)visitor.Context.Module;
                if (object.ReferenceEquals(this.ContainingModule, moduleBeingBuilt.SourceModule))
                {
                    Debug.Assert(((Cci.IMethodReference)this).GetResolvedMethod(visitor.Context) != null);
                    visitor.Visit((Cci.IMethodDefinition)this);
                } 
                else
                {
                    visitor.Visit((Cci.IMethodReference)this);
                }
            }
        }
 public sealed override void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IGenericTypeInstanceReference)this);
 }
示例#12
0
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     CheckDefinitionInvariant();
     visitor.Visit((Cci.IPropertyDefinition)this);
 }
示例#13
0
        void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
        {
            throw ExceptionUtilities.Unreachable;
            //At present we have no scenario that needs this method.
            //Should one arise, uncomment implementation and add a test.
#if false   
            Debug.Assert(this.IsDefinitionOrDistinct());

            if (!this.IsDefinition)
            {
                visitor.Visit((IParameterTypeInformation)this);
            }
            else if (this.ContainingModule == ((Module)visitor.Context).SourceModule)
            {
                visitor.Visit((IParameterDefinition)this);
            }
            else
            {
                visitor.Visit((IParameterTypeInformation)this);
            }
#endif
        }
        void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
        {
            throw ExceptionUtilities.Unreachable;
            //We've not yet discovered a scenario in which we need this.
            //If you're hitting this exception, uncomment the code below
            //and add a unit test.
#if false
            Debug.Assert(this.IsDefinition);

            SymbolKind kind = this.ContainingSymbol.Kind;

            if (((Module)visitor.Context).SourceModule == this.ContainingModule)
            {
                if (kind == SymbolKind.NamedType)
                {
                    visitor.Visit((IGenericTypeParameter)this);
                }
                else if (kind == SymbolKind.Method)
                {
                    visitor.Visit((IGenericMethodParameter)this);
                }
                else
                {
                    throw new NotSupportedException();
                }
            }
            else
            {
                if (kind == SymbolKind.NamedType)
                {
                    visitor.Visit((IGenericTypeParameterReference)this);
                }
                else if (kind == SymbolKind.Method)
                {
                    visitor.Visit((IGenericMethodParameterReference)this);
                }
                else
                {
                    throw new NotSupportedException();
                }
            }
#endif
        }
 public override void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IGenericMethodInstanceReference)this);
 }
 public override void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.ISpecializedNestedTypeReference)this);
 }
示例#17
0
 public override void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IAssembly)this);
 }