Exemple #1
0
 public IGeneralSignatureMemberUniqueIdentifier GetIdentifier(IIntermediateIndexerMember member)
 {
     if (member is IIntermediateClassIndexerMember || member is IIntermediateStructIndexerMember)
     {
         var internalHelper = member as _IIntermediateIndexerSignatureMember;
         var classIndexer   = member as IIntermediateClassIndexerMember;
         if (classIndexer != null)
         {
             var firstImpl = classIndexer.Implementations.FirstOrDefault();
             if (firstImpl != null)
             {
                 return(GetIdentifierInternal(member, internalHelper, firstImpl));
             }
         }
         else
         {
             var structIndexer = member as IIntermediateStructIndexerMember;
             var firstImpl     = structIndexer.Implementations.FirstOrDefault();
             if (firstImpl != null)
             {
                 return(GetIdentifierInternal(member, internalHelper, firstImpl));
             }
         }
     }
     return(IntermediateGateway.DefaultUniqueIdentifierService.GetIdentifier(member));
 }
Exemple #2
0
 private static IGeneralSignatureMemberUniqueIdentifier GetIdentifierInternal(IIntermediateIndexerMember member, _IIntermediateIndexerSignatureMember internalHelper, IType firstImpl)
 {
     if (internalHelper == null)
     {
         return(TypeSystemIdentifiers.GetSignatureIdentifier(member.Name, string.Format("{0}{1}", firstImpl.FullName, member.UserSpecificQualifier), member.Parameters.ParameterTypes.ToArray()));
     }
     else if (internalHelper.IsDisposed)
     {
         throw new InvalidOperationException(Utilities.Properties.Resources.ObjectStateThrowMessage);
     }
     else if (internalHelper.AreParametersInitialized)
     {
         return(TypeSystemIdentifiers.GetSignatureIdentifier(member.Name, string.Format("{0}{1}", firstImpl.FullName, member.UserSpecificQualifier), member.Parameters.ParameterTypes.ToArray()));
     }
     else
     {
         return(TypeSystemIdentifiers.GetSignatureIdentifier(member.Name, string.Format("{0}{1}", firstImpl.FullName, member.UserSpecificQualifier), new IType[0]));
     }
 }
Exemple #3
0
        public IGeneralSignatureMemberUniqueIdentifier GetIdentifier(IIntermediateIndexerMember member)
        {
            var internalHelper = member as _IIntermediateIndexerSignatureMember;

            if (internalHelper == null)
            {
                return(TypeSystemIdentifiers.GetSignatureIdentifier(member.Name, member.Parameters.ParameterTypes.ToArray()));
            }
            else if (internalHelper.IsDisposed)
            {
                throw new InvalidOperationException(Utilities.Properties.Resources.ObjectStateThrowMessage);
            }
            else if (internalHelper.AreParametersInitialized)
            {
                return(TypeSystemIdentifiers.GetSignatureIdentifier(member.Name, member.Parameters.ParameterTypes.ToArray()));
            }
            else
            {
                return(TypeSystemIdentifiers.GetSignatureIdentifier(member.Name));
            }
        }
Exemple #4
0
 public void DefineDeclaration(IIntermediateIndexerMember declaration)
 {
 }
Exemple #5
0
 public void ReferenceDeclaration(IIntermediateIndexerMember declaration)
 {
 }
Exemple #6
0
            public string Visit <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>(IIntermediateIndexerMember <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent> indexer, IntermediateNameRequestDetails context)
                where TIndexer : Abstract.Members.IIndexerMember <TIndexer, TIndexerParent>
                where TIntermediateIndexer : TIndexer, IIntermediateIndexerMember <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>
                where TIndexerParent : Abstract.IIndexerParent <TIndexer, TIndexerParent>
                where TIntermediateIndexerParent : TIndexerParent, IIntermediateIndexerParent <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>
            {
                string name = null;

                switch (context)
                {
                case IntermediateNameRequestDetails.TargetFileName:
                    if (!(indexer.Parent is IIntermediateType))
                    {
                        return(null);
                    }
                    this.fileNameLookup.TryGetValue(((IIntermediateType)indexer.Parent).Assembly, out name);
                    if (this.HtmlContext)
                    {
                        name = string.Format("{0}#idx{1:X8}", name, indexer.GetHashCode());
                    }
                    break;

                case IntermediateNameRequestDetails.SourceFileName:
                    if (!(indexer.Parent is IIntermediateType))
                    {
                        return(null);
                    }
                    name = ((IIntermediateType)indexer.Parent).Assembly.FileName;
                    break;

                case IntermediateNameRequestDetails.DisplayName:
                    name = indexer.Name;
                    break;

                case IntermediateNameRequestDetails.ReferenceName:
                    if (this.HtmlContext)
                    {
                        name = string.Format("idx{0:X8}", indexer.GetHashCode());
                    }
                    break;
                }
                return(name);
            }
Exemple #7
0
 void IIntermediateMemberVisitor.Visit <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>(IIntermediateIndexerMember <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent> intermediateMember)
 {
     this.Translate(intermediateMember);
 }
Exemple #8
0
 public TestLinkerResult Visit <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>(IIntermediateIndexerMember <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent> indexer, ICompilationContext context)
     where TIndexer : IIndexerMember <TIndexer, TIndexerParent>
     where TIntermediateIndexer : TIndexer, IIntermediateIndexerMember <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>
     where TIndexerParent : IIndexerParent <TIndexer, TIndexerParent>
     where TIntermediateIndexerParent : TIndexerParent, IIntermediateIndexerParent <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>
 {
     throw new NotImplementedException();
 }
Exemple #9
0
 public void DefineDeclaration(IIntermediateIndexerMember declaration)
 {
     this.DefineDeclaration((IIntermediateMember)declaration);
 }
Exemple #10
0
 public abstract void Translate <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>(IIntermediateIndexerMember <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent> intermediateMember)
     where TIndexer :
 IIndexerMember <TIndexer, TIndexerParent>
     where TIntermediateIndexer :
 TIndexer,
 IIntermediateIndexerMember <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>
     where TIndexerParent :
 IIndexerParent <TIndexer, TIndexerParent>
     where TIntermediateIndexerParent :
 TIndexerParent,
 IIntermediateIndexerParent <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>;
Exemple #11
0
 public void ReferenceDeclaration(IIntermediateIndexerMember declaration)
 {
     this.Formatter.ReferenceDeclaration(declaration);
 }
Exemple #12
0
 public void DefineDeclaration(IIntermediateIndexerMember declaration)
 {
     this.Formatter.DefineDeclaration(declaration);
 }
Exemple #13
0
 public TransformationKind Visit <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>(IIntermediateIndexerMember <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent> indexer, ITransformationContext context)
     where TIndexer : IIndexerMember <TIndexer, TIndexerParent>
     where TIntermediateIndexer : TIndexer, IIntermediateIndexerMember <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>
     where TIndexerParent : IIndexerParent <TIndexer, TIndexerParent>
     where TIntermediateIndexerParent : TIndexerParent, IIntermediateIndexerParent <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>
 {
     throw new NotImplementedException();
 }