Ejemplo n.º 1
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);
                }
            }
        }
Ejemplo n.º 2
0
 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.
 }
 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);
     }
 }
Ejemplo n.º 4
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)
        {
            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
        }
Ejemplo n.º 6
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
        }
 public override void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IGenericMethodInstanceReference) this);
 }
Ejemplo n.º 8
0
 void Cci.IMetadataExpression.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit(this);
 }
Ejemplo n.º 9
0
 public void Dispatch(MetadataVisitor visitor) => visitor.Visit((IMethodDefinition)this);
Ejemplo n.º 10
0
 void IReference.Dispatch(MetadataVisitor visitor)
 {
     visitor.Visit((IModifiedTypeReference)this);
 }
 void IReference.Dispatch(MetadataVisitor visitor)
 {
     visitor.Visit(this);
 }
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     throw new NotSupportedException();
 }
Ejemplo n.º 13
0
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.INamespaceTypeReference) this);
 }
Ejemplo n.º 14
0
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     CheckDefinitionInvariant();
     visitor.Visit((Cci.IPropertyDefinition) this);
 }
Ejemplo n.º 15
0
 void Cci.IMethodBody.Dispatch(Cci.MetadataVisitor visitor)
 {
     throw ExceptionUtilities.Unreachable;
 }
 void IReference.Dispatch(MetadataVisitor visitor)
 {
     visitor.Visit((IModifiedTypeReference)this);
 }
Ejemplo n.º 17
0
 void Cci.IMethodBody.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IMethodBody) this);
 }
 void IReference.Dispatch(MetadataVisitor visitor) => UnderlyingType.Dispatch(visitor);
Ejemplo n.º 19
0
 void IReference.Dispatch(MetadataVisitor visitor)
 {
     throw ExceptionUtilities.Unreachable;
 }
Ejemplo n.º 20
0
 public void Dispatch(MetadataVisitor visitor)
 {
 }
Ejemplo n.º 21
0
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IAssemblyReference) this);
 }
Ejemplo n.º 22
0
 public void Dispatch(MetadataVisitor visitor)
 {
 }
Ejemplo n.º 23
0
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit(this);
 }
Ejemplo n.º 24
0
 void IReference.Dispatch(MetadataVisitor visitor)
 {
     visitor.Visit((IAliasForType)this);
 }
Ejemplo n.º 25
0
 public override void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.ISpecializedFieldReference) this);
 }
Ejemplo n.º 26
0
 public override void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IAssembly) this);
 }
Ejemplo n.º 27
0
 public void Dispatch(Cci.MetadataVisitor visitor)
 {
     throw ExceptionUtilities.Unreachable;
 }
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IPointerTypeReference) this);
 }
Ejemplo n.º 29
0
 public abstract void Dispatch(Cci.MetadataVisitor visitor);
Ejemplo n.º 30
0
 void IReference.Dispatch(MetadataVisitor visitor)
 {
     throw ExceptionUtilities.Unreachable;
 }
Ejemplo n.º 31
0
 public sealed override void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IGenericTypeInstanceReference) this);
 }
Ejemplo n.º 32
0
 void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IPropertyDefinition) this);
 }
Ejemplo n.º 33
0
 public void Dispatch(Cci.MetadataVisitor visitor)
 {
     visitor.Visit((Cci.IMethodReference) this);
 }