Exemplo n.º 1
0
        protected override void BeginProcessing()
        {
            if (!string.IsNullOrEmpty(Path))
                Path = GetUnresolvedProviderPathFromPSPath(Path);

            FileCollection collection;
            if (Simple)
                collection = new SimpleFileCollection(Path, FileFormat);
            else
                collection = new NormalFileCollection(Path, FileFormat);

            collection.Read(NewCollection);

            SessionState.PSVariable.Set(CollectionVariable ?? Actor.CollectionVariable, collection);
        }
Exemplo n.º 2
0
        protected override void BeginProcessing()
        {
            if (!string.IsNullOrEmpty(Path))
            {
                Path = GetUnresolvedProviderPathFromPSPath(Path);
            }

            FileCollection collection;

            if (Simple)
            {
                collection = new SimpleFileCollection(Path, FileFormat);
            }
            else
            {
                collection = new NormalFileCollection(Path, FileFormat);
            }

            collection.Read(NewCollection);

            SessionState.PSVariable.Set(CollectionVariable ?? Actor.CollectionVariable, collection);
        }