예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Globber"/> class.
        /// </summary>
        /// <param name="env">The environment.</param>
        /// <exception cref="ArgumentNullException"><paramref name="env"/> is <see langword="null"/></exception>
        public Globber(IFileSystemEnvironment env)
        {
            if (env == null)
            {
                throw new ArgumentNullException(nameof(env));
            }

            _env      = env;
            _parser   = new GlobParser(env);
            _visitor  = new GlobVisitor(env);
            _comparer = new PathComparer(env.IsUnix());
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Globber"/> class.
        /// </summary>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="environment">The environment.</param>
        public Globber(IFileSystem fileSystem, IEnvironment environment)
        {
            if (fileSystem == null)
            {
                throw new ArgumentNullException(nameof(fileSystem));
            }

            if (environment is null)
            {
                throw new ArgumentNullException(nameof(environment));
            }

            _parser  = new GlobParser(environment);
            _visitor = new GlobVisitor(fileSystem, environment);
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Globber"/> class.
        /// </summary>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="environment">The environment.</param>
        public Globber(IFileSystem fileSystem, ICakeEnvironment environment)
        {
            if (fileSystem == null)
            {
                throw new ArgumentNullException("fileSystem");
            }
            if (environment == null)
            {
                throw new ArgumentNullException("environment");
            }

            _environment = environment;
            _parser      = new GlobParser(environment);
            _visitor     = new GlobVisitor(fileSystem, environment);
            _comparer    = new PathComparer(environment.IsUnix());
        }
예제 #4
0
파일: RelativeRoot.cs 프로젝트: qhris/cake
 public override void Accept(GlobVisitor globber, GlobVisitorContext context)
 {
     globber.VisitRelativeRoot(this, context);
 }
예제 #5
0
파일: PathSegment.cs 프로젝트: jnm2/cake
 public override void Accept(GlobVisitor globber, GlobVisitorContext context)
 {
     globber.VisitSegment(this, context);
 }
예제 #6
0
 public override void Accept(GlobVisitor visitor, GlobVisitorContext context)
 {
     visitor.VisitParent(this, context);
 }
예제 #7
0
 public void Accept(GlobVisitor visitor)
 {
     visitor.Visit(this);
 }
예제 #8
0
 public override void Accept(GlobVisitor globber, GlobVisitorContext context)
 {
     globber.VisitRecursiveWildcardSegment(this, context);
 }
예제 #9
0
 public override void Accept(GlobVisitor visitor, GlobVisitorContext context)
 {
     visitor.VisitWildcardSegmentNode(this, context);
 }
예제 #10
0
 public override void Accept(GlobVisitor visitor, GlobVisitorContext context)
 {
     visitor.VisitWindowsRoot(this, context);
 }