public static TypeTableEntry Create( MemberInfo member, PolymorphismTarget targetType, PolymorphismSchema defaultSchema ) { var result = new TypeTableEntry(); var memberName = member.ToString(); foreach ( var attribute in member.GetCustomAttributes( false ) .OfType<IPolymorphicHelperAttribute>() .Where( a => a.Target == targetType ) ) { // TupleItem schema should never come here, so passing -1 as tupleItemNumber is OK. result.Interpret( attribute, memberName, -1 ); } if ( defaultSchema != null ) { // TupleItem schema should never come here, so passing -1 as tupleItemNumber is OK. result.SetDefault( targetType, memberName, -1, defaultSchema ); } return result; }
private TypeTable( TypeTableEntry member, TypeTableEntry collectionItem, TypeTableEntry dictionaryKey #if !NETFX_35 && !UNITY , IList<TypeTableEntry> tupleItems #endif // !NETFX_35 && !UNITY ) { this.Member = member; this.CollectionItem = collectionItem; this.DictionaryKey = dictionaryKey; #if !NETFX_35 && !UNITY this.TupleItems = tupleItems; #endif // !NETFX_35 && !UNITY }