protected ILocalFsResourceAccessor _underlayingResource = null; // Only set if the path points to a file system resource - not a server

    #endregion

    public NetworkNeighborhoodResourceAccessor(NetworkNeighborhoodResourceProvider parent, string path)
    {
      _parent = parent;
      _path = path;
      if (IsServerPath(path))
        return;
      IResourceAccessor ra;
      if (!LocalFsResourceProvider.Instance.TryCreateResourceAccessor("/" + path, out ra))
        throw new IllegalCallException("Unable to access resource '{0}'", path);
      _underlayingResource = (ILocalFsResourceAccessor) ra;
    }
    protected ILocalFsResourceAccessor _underlayingResource = null; // Only set if the path points to a file system resource - not a server or root

    #endregion

    #region Ctor

    public NetworkNeighborhoodResourceAccessor(NetworkNeighborhoodResourceProvider parent, string path)
    {
      _parent = parent;
      _path = path;
      if (IsRootPath(path ) || IsServerPath(path))
        return;

      IResourceAccessor ra;
      using (ServiceRegistration.Get<IImpersonationService>().CheckImpersonationFor(CanonicalLocalResourcePath))
        if (LocalFsResourceProvider.Instance.TryCreateResourceAccessor("/" + path, out ra))
          _underlayingResource = (ILocalFsResourceAccessor)ra;
    }
    public NetworkNeighborhoodResourceAccessor(NetworkNeighborhoodResourceProvider parent, string path)
    {
      _parent = parent;
      _path = path;
      if (IsServerPath(path))
        return;

      _impersonationContext = ImpersonateUser(null);

      IResourceAccessor ra;
      if (LocalFsResourceProvider.Instance.TryCreateResourceAccessor("/" + path, out ra))
        _underlayingResource = (ILocalFsResourceAccessor) ra;
    }
        protected ILocalFsResourceAccessor _underlayingResource = null; // Only set if the path points to a file system resource - not a server

        #endregion

        public NetworkNeighborhoodResourceAccessor(NetworkNeighborhoodResourceProvider parent, string path)
        {
            _parent = parent;
            _path   = path;
            if (IsServerPath(path))
            {
                return;
            }
            IResourceAccessor ra;

            if (!LocalFsResourceProvider.Instance.TryCreateResourceAccessor("/" + path, out ra))
            {
                throw new IllegalCallException("Unable to access resource '{0}'", path);
            }
            _underlayingResource = (ILocalFsResourceAccessor)ra;
        }
Ejemplo n.º 5
0
        protected ILocalFsResourceAccessor _underlayingResource = null; // Only set if the path points to a file system resource - not a server or root

        #endregion

        #region Ctor

        public NetworkNeighborhoodResourceAccessor(NetworkNeighborhoodResourceProvider parent, string path)
        {
            _parent = parent;
            _path   = path;
            if (IsRootPath(path) || IsServerPath(path))
            {
                return;
            }

            IResourceAccessor ra;

            using (ServiceRegistration.Get <IImpersonationService>().CheckImpersonationFor(CanonicalLocalResourcePath))
                if (LocalFsResourceProvider.Instance.TryCreateResourceAccessor("/" + path, out ra))
                {
                    _underlayingResource = (ILocalFsResourceAccessor)ra;
                }
        }
Ejemplo n.º 6
0
        public NetworkNeighborhoodResourceAccessor(NetworkNeighborhoodResourceProvider parent, string path)
        {
            _parent = parent;
            _path   = path;
            if (IsServerPath(path))
            {
                return;
            }

            _impersonationContext = ImpersonateUser(null);

            IResourceAccessor ra;

            if (LocalFsResourceProvider.Instance.TryCreateResourceAccessor("/" + path, out ra))
            {
                _underlayingResource = (ILocalFsResourceAccessor)ra;
            }
        }