// return the "accessor" for level k. This is the object used to get // the value of level k (together with the level-k item). It can be // a DP, a PropertyInfo, a PropertyDescriptor, etc. internal object GetAccessor(int k) { object accessor = _earlyBoundPathParts[k]; if (accessor == null) { accessor = SingleWorker.GetAccessor(k); } return(accessor); }
// return the value of the path. Must be called within the scope // of SetContext. internal object GetValue() { return(SingleWorker.RawValue()); }
// return the arguments to use when the accessor at level k is an // indexer. (If it's not an indexer, this returns null.) internal object[] GetIndexerArguments(int k) { return(SingleWorker.GetIndexerArguments(k)); }
// return the item for level k. This is the result of evaluating the // path up to level k-1, starting at the root item. internal object GetItem(int k) { return(SingleWorker.GetItem(k)); }
// Set the context for the path. Use this method in "target" mode // to connect the path to a rootItem for a short time: // using (path.SetContext(myItem)) // { // ... call target-mode convenience methods ... // } internal IDisposable SetContext(object rootItem) { return(SingleWorker.SetContext(rootItem)); }