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)); }
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])); } }
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)); } }
public void DefineDeclaration(IIntermediateIndexerMember declaration) { }
public void ReferenceDeclaration(IIntermediateIndexerMember declaration) { }
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); }
void IIntermediateMemberVisitor.Visit <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent>(IIntermediateIndexerMember <TIndexer, TIntermediateIndexer, TIndexerParent, TIntermediateIndexerParent> intermediateMember) { this.Translate(intermediateMember); }
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(); }
public void DefineDeclaration(IIntermediateIndexerMember declaration) { this.DefineDeclaration((IIntermediateMember)declaration); }
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>;
public void ReferenceDeclaration(IIntermediateIndexerMember declaration) { this.Formatter.ReferenceDeclaration(declaration); }
public void DefineDeclaration(IIntermediateIndexerMember declaration) { this.Formatter.DefineDeclaration(declaration); }
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(); }