Ejemplo n.º 1
0
        /// <summary>
        ///     Creates a new macro expansion session for the specified compiler target.
        /// </summary>
        /// <param name = "target">The target to expand macros in.</param>
        public MacroSession([NotNull] CompilerTarget target)
        {
            if(target == null)
                throw new ArgumentNullException("target");

            _target = target;
            _astFactory = _target.Factory;
            
            _globalSymbols = SymbolStore.Create(_target.Loader.TopLevelSymbols);
            _outerVariables = new ReadOnlyCollectionView<string>(_target.OuterVariables);

            _buildCommandToken = target.Loader.RequestBuildCommands();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Determines whether two converted collections are same.
 /// </summary>
 /// <param name="other">Other collection to compare.</param>
 /// <returns><see langword="true"/> if this view wraps the same source collection and contains the same converter as other view; otherwise, <see langword="false"/>.</returns>
 public bool Equals(ReadOnlyCollectionView <I, O> other) => ReferenceEquals(source, other.source) && Equals(mapper, other.mapper);