private IEnumerator <ILiquidizable> GetEnumeratorInternal() { return(_enumerable .Cast <object>() .Select(x => LiquidUtil.CreateSafeObject(x)) .OfType <ILiquidizable>() .GetEnumerator()); }
protected object GetOrCreateSafeObject(string name) { if (!_safeObjects.TryGetValue(name, out var safeObject)) { safeObject = LiquidUtil.CreateSafeObject(InvokeMember(name)); if (safeObject is ISafeObject) { _safeObjects[name] = safeObject; } } return(safeObject); }