/// <summary> /// Returns a unique identifier for the <see cref="IndexerMember"/>. /// </summary> /// <returns>A unique <see cref="System.String"/> pertinent to the /// <see cref="IndexerMember"/>.</returns> public override string GetUniqueIdentifier() { string signature = this.Name; IIndexerParameterMembers parameters = this.Parameters; /* * * Add the parameters, use the parameter type information to yield a type-signature. * Names aren't as important because they are more likely to repeat in a type-strict * system that translates various types into an common understanding underneath. * */ if (parameters.Count > 0) { string[] names = new string[parameters.Count]; for (int i = 0; i < parameters.Count; i++) { /* * * ToDo: Add 'GetTypeName' to type-references, stand-alone types * may not contain necessary type-arguments. * */ names[i] = parameters.Values[i].ParameterType.TypeInstance. GetTypeName(CodeGeneratorHelper.DefaultDomOptions); } signature += string.Format("({0})", string.Join(", ", names));; } else { signature += "()"; } if (this.PrivateImplementationTarget != null) { return(string.Format("{0} on {1}", signature, this.PrivateImplementationTarget.TypeInstance.GetTypeName(CodeGeneratorHelper.DefaultDomOptions))); } else { return(signature); } }
public virtual void TranslateParameters(IIndexerParameterMembers indexerParameters) { TranslateParameters <IIndexerParameterMember, CodeMemberProperty, IIndexerMember>(indexerParameters); }
private void InitializeParameters() { this.parameters = new IndexerParameterMembers(this); }