Microsoft.Scripting.MutableTuple.GetAccessProperties C# (CSharp) Méthode

GetAccessProperties() static private méthode

Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple.
static private GetAccessProperties ( Type tupleType, int size, int index ) : IEnumerable
tupleType System.Type
size int
index int
Résultat IEnumerable
        internal static IEnumerable<PropertyInfo> GetAccessProperties(Type tupleType, int size, int index) {
            ContractUtils.RequiresNotNull(tupleType, "tupleType");

            if (index < 0 || index >= size) throw new ArgumentException("index");

            foreach (int curIndex in GetAccessPath(size, index)) {
                PropertyInfo pi = tupleType.GetProperty("Item" + String.Format("{0:D3}", curIndex));
                Debug.Assert(pi != null);
                yield return pi;
                tupleType = pi.PropertyType;
            }
        }