public IMember CreateItem(CliMemberType memberKind, ICliMetadataTableRow metadataEntry, IMemberUniqueIdentifier uniqueIdentifier, int index) { switch (memberKind) { case CliMemberType.BinaryOperator: return(this.GetBinaryOperator((ICliMetadataMethodDefinitionTableRow)metadataEntry, (IBinaryOperatorUniqueIdentifier)uniqueIdentifier)); case CliMemberType.Constructor: return(this.GetConstructor((ICliMetadataMethodDefinitionTableRow)(metadataEntry), (IGeneralSignatureMemberUniqueIdentifier)uniqueIdentifier)); case CliMemberType.Event: return(this.GetEvent((ICliMetadataEventTableRow)metadataEntry, (IGeneralSignatureMemberUniqueIdentifier)uniqueIdentifier)); case CliMemberType.Field: return(this.GetField((ICliMetadataFieldTableRow)metadataEntry)); case CliMemberType.Indexer: return(this.GetIndexer((ICliMetadataPropertyTableRow)metadataEntry, (IGeneralSignatureMemberUniqueIdentifier)uniqueIdentifier)); case CliMemberType.Method: return(this.GetMethod((ICliMetadataMethodDefinitionTableRow)metadataEntry, (IGeneralGenericSignatureMemberUniqueIdentifier)uniqueIdentifier)); case CliMemberType.Property: return((TProperty)this.GetProperty((ICliMetadataPropertyTableRow)metadataEntry)); case CliMemberType.TypeCoercionOperator: return((ITypeCoercionMember <TType>) this.GetTypeOperator((ICliMetadataMethodDefinitionTableRow)metadataEntry, (ITypeCoercionUniqueIdentifier)uniqueIdentifier)); case CliMemberType.UnaryOperator: return((IUnaryOperatorCoercionMember <TType>) this.GetUnaryOperator((ICliMetadataMethodDefinitionTableRow)metadataEntry, (IUnaryOperatorUniqueIdentifier)uniqueIdentifier)); default: throw new InvalidOperationException(); } }
internal int GetMetadataIndex(ICliMetadataTableRow metadataEntry) { if (memberSources == null) { return(-1); } return(this.memberSources.GetIndexOf(metadataEntry)); }
public IMember CreateItem(CliMemberType memberKind, ICliMetadataTableRow metadataEntry, IMemberUniqueIdentifier uniqueIdentifier, int index) { switch (memberKind) { case CliMemberType.Field: return(new FieldMember(this, (ICliMetadataFieldTableRow)metadataEntry, (IGeneralMemberUniqueIdentifier)uniqueIdentifier)); default: throw new NotSupportedException(); } }
public IMember CreateItem(CliMemberType memberKind, ICliMetadataTableRow metadataEntry, IMemberUniqueIdentifier uniqueIdentifier, int index) { switch (memberKind) { case CliMemberType.Event: return(new Event(this, (ICliMetadataEventTableRow)metadataEntry, (IGeneralSignatureMemberUniqueIdentifier)uniqueIdentifier)); case CliMemberType.Indexer: return(new Indexer(this, (ICliMetadataPropertyTableRow)metadataEntry, (IGeneralSignatureMemberUniqueIdentifier)uniqueIdentifier)); case CliMemberType.Method: return(new Method(this, (ICliMetadataMethodDefinitionTableRow)metadataEntry, (IGeneralGenericSignatureMemberUniqueIdentifier)uniqueIdentifier)); case CliMemberType.Property: return(new Property(this, (ICliMetadataPropertyTableRow)metadataEntry)); } throw new NotSupportedException(); }