Foobricator.Sources.Iterator.Iterator C# (CSharp) Method

Iterator() public method

Initialise
public Iterator ( IList sources, string scope ) : System
sources IList
scope string
return System
        public Iterator(IList<object> sources, string scope)
        {
            Scope = scope ?? DefaultScope;
            if (!_instances.ContainsKey(Scope))
            {
                _instances[Scope] = new List<IIterable>();
            }
            _instances[Scope].Add(this);

            Sources = sources.Select(p => p is DataReference
                ? ((DataReference) p).Dereference()
                : p)
                .ToList();
            Next();
        }