public override object GetIndex(Func <object> proceed, object self, System.Collections.Generic.IEnumerable <object> keys) { if (keys.Count() == 1) { // Here's the new bit var key = System.Convert.ToString(keys.Single()); // Check for the proxy symbol if (key.Contains("@")) { // Find the proxy! var split = key.Split('@'); // Access the proxy shape return(_Proxies[split[0]]() // Find the right zone on it .Zones[split[1]]); } else { // Otherwise, defer to the ZonesBehavior activator, which we made available // This will always return a ZoneOnDemandBehavior for the local shape return(_zonesActivator()[key]); } } return(proceed()); }
public override object GetIndex(Func <object> proceed, object self, System.Collections.Generic.IEnumerable <object> keys) { if (keys.Count() == 1) { return(GetMember(proceed, null, System.Convert.ToString(keys.Single()))); } return(proceed()); }