public FileSystemActivityEventArgs(FileSystemActivity activity, NodeType nodeType, string name, string path) { this.Activity = activity; this.Name = name; this.Path = path; this.NodeType = nodeType; }
public NodeNotFoundException(INodeAddress nodeAddress, NodeType nodeType, Exception innerException) : base(nodeAddress != null ? "VirtualFileSystem item not found: " + nodeAddress.ToString() : "", innerException) { NodeType = nodeType; NodeAddress = nodeAddress; if (NodeAddress != null) { Uri = NodeAddress.Uri; } }
public override INode Filter(ref INodeResolver resolver, ref INodeAddress address, ref NodeType nodeType, out bool canCache) { string value; canCache = false; if (this.QueryKey == null) { return null; } else { try { if (address.QueryValues[this.QueryKey] == null) { return null; } value = (string)address.QueryValues[this.QueryKey]; } catch (KeyNotFoundException) { return null; } } if (nodeType.Equals(NodeType.File)) { canCache = true; var query = StringUriUtils.BuildQuery ( address.QueryValues, pair => pair.Key.Equals(this.QueryKey, StringComparison.CurrentCultureIgnoreCase) ); var uri = address.AbsolutePath + "?" + query; var file = resolver.ResolveFile(uri); var service = (ITempIdentityFileService)file.GetService(new TempIdentityFileServiceType(value)); canCache = true; return service.GetTempFile(); } return null; }
public NodeType(Type runtimeType, NodeType innerType) { this.RuntimeType = runtimeType; this.InnerType = innerType; }
internal RegexBasedNodePredicateHelper(Regex regex, NodeType nodeType) : base(regex) { this.nodeType = nodeType; }
public NodeType(NodeType innerType) { this.RuntimeType = GetType(); this.InnerType = innerType; }
public abstract INode Resolve(string uri, NodeType nodeType, AddressScope scope, FileSystemOptions options = null);
public abstract INode Resolve(string name, NodeType nodeType, AddressScope scope);
public virtual bool Is(NodeType type) { if (this == NodeType.Any) { return true; } if (type == NodeType.Any) { return true; } return type.RuntimeType.IsAssignableFrom(this.RuntimeType); }
void INodeCache.Purge(INodeAddress address, NodeType nodeType) { }
public static Predicate <INode> ByNodeTypeExact(NodeType nodeType) { return(ByNodeType(nodeType.Equals)); }
public NodeNotFoundException(INodeAddress nodeAddress, NodeType nodeType) : this(nodeAddress, nodeType, null) { }
public static Predicate <INode> ByNodeType(NodeType nodeType) { return(ByNodeType(value => value.Equals(NodeType.Any) || nodeType.Equals(NodeType.Any) || nodeType.Equals(value))); }
public static bool IsDirectory(NodeType nodeType) { return(NodeType.Directory.Is(nodeType)); }
public static bool IsFile(NodeType nodeType) { return(NodeType.File.Is(nodeType)); }
public static bool IsFile(NodeType nodeType) { return NodeType.File.Is(nodeType); }
public NodeTypeNotSupportedException(NodeType nodeType) : base("Node type not supported: " + nodeType) { }
public static bool IsDirectory(NodeType nodeType) { return NodeType.Directory.Is(nodeType); }
public override INode Resolve(string uri, NodeType nodeType, AddressScope scope) { return Resolve(uri, nodeType, scope, FileSystemOptions.Default); }
public static Predicate<INode> ByNodeType(NodeType nodeType) { return ByNodeType(value => value.Equals(NodeType.Any) || nodeType.Equals(NodeType.Any) || nodeType.Equals(value)); }
public void PurgeWithDescendents(INodeAddress address, NodeType nodeType) { }
public static Predicate<INode> ByNodeTypeExact(NodeType nodeType) { return ByNodeType(nodeType.Equals); }
public override INode Resolve(string uri, NodeType nodeType, AddressScope scope, FileSystemOptions options) { if (uri.IsNullOrEmpty()) { if (uri == null) { throw new ArgumentNullException("uri"); } else { throw new ArgumentException("uri"); } } if (uri[0] == ' ') { uri = uri.Trim(); } if (uri.Length == 0) { throw new ArgumentException(uri, "uri"); } foreach (var provider in providers) { if (provider.SupportsUri(uri)) { return provider.Find(this, uri, nodeType, options); } } throw new NotSupportedException(uri); }
public virtual INode Resolve(string name, NodeType nodeType) { return Resolve(name, nodeType, AddressScope.FileSystem); }
public override INode Resolve(string uri, NodeType nodeType, AddressScope scope) { return(Resolve(uri, nodeType, scope, FileSystemOptions.Default)); }