Skip to content

Commit ba1ef0b

Browse files
committed
refactor: use ValueObject as the internal keys of VFSIndex
1 parent 1ff8b6c commit ba1ef0b

25 files changed

+192
-155
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#### [Atypical.VirtualFileSystem.Core](VirtualFileSystem.md 'VirtualFileSystem')
22
### [Atypical.VirtualFileSystem.Core](VirtualFileSystem.md#Atypical.VirtualFileSystem.Core 'Atypical.VirtualFileSystem.Core').[VFSIndex](VFSIndex.md 'Atypical.VirtualFileSystem.Core.VFSIndex')
33

4-
## VFSIndex.ContainsKey(string) Method
4+
## VFSIndex.ContainsKey(VFSPath) Method
55

66
Determines whether the index contains the specified key.
77

88
```csharp
9-
public bool ContainsKey(string key);
9+
public bool ContainsKey(Atypical.VirtualFileSystem.Core.Abstractions.VFSPath key);
1010
```
1111
#### Parameters
1212

13-
<a name='Atypical.VirtualFileSystem.Core.VFSIndex.ContainsKey(string).key'></a>
13+
<a name='Atypical.VirtualFileSystem.Core.VFSIndex.ContainsKey(Atypical.VirtualFileSystem.Core.Abstractions.VFSPath).key'></a>
1414

15-
`key` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')
15+
`key` [VFSPath](VFSPath.md 'Atypical.VirtualFileSystem.Core.Abstractions.VFSPath')
1616

1717
#### Returns
1818
[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')

docs/api/VFSIndex.GetPathsStartingWith(VFSDirectoryPath).md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Gets the paths starting with the specified directory path.
77

88
```csharp
9-
public System.Collections.Immutable.ImmutableArray<string> GetPathsStartingWith(Atypical.VirtualFileSystem.Core.VFSDirectoryPath directoryPath);
9+
public System.Collections.Immutable.ImmutableArray<Atypical.VirtualFileSystem.Core.Abstractions.VFSPath> GetPathsStartingWith(Atypical.VirtualFileSystem.Core.VFSDirectoryPath directoryPath);
1010
```
1111
#### Parameters
1212

@@ -15,4 +15,4 @@ public System.Collections.Immutable.ImmutableArray<string> GetPathsStartingWith(
1515
`directoryPath` [VFSDirectoryPath](VFSDirectoryPath.md 'Atypical.VirtualFileSystem.Core.VFSDirectoryPath')
1616

1717
#### Returns
18-
[System.Collections.Immutable.ImmutableArray&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Immutable.ImmutableArray-1 'System.Collections.Immutable.ImmutableArray`1')[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Immutable.ImmutableArray-1 'System.Collections.Immutable.ImmutableArray`1')
18+
[System.Collections.Immutable.ImmutableArray&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Immutable.ImmutableArray-1 'System.Collections.Immutable.ImmutableArray`1')[VFSPath](VFSPath.md 'Atypical.VirtualFileSystem.Core.Abstractions.VFSPath')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Immutable.ImmutableArray-1 'System.Collections.Immutable.ImmutableArray`1')

docs/api/VFSIndex.Keys.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
Gets the keys of the raw index.
77

88
```csharp
9-
public System.Collections.Generic.IEnumerable<string> Keys { get; }
9+
public System.Collections.Generic.IEnumerable<Atypical.VirtualFileSystem.Core.Abstractions.VFSPath> Keys { get; }
1010
```
1111

1212
#### Property Value
13-
[System.Collections.Generic.IEnumerable&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')
13+
[System.Collections.Generic.IEnumerable&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[VFSPath](VFSPath.md 'Atypical.VirtualFileSystem.Core.Abstractions.VFSPath')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')

docs/api/VFSIndex.RawIndex.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
Gets the raw index of the virtual file system.
77

88
```csharp
9-
public System.Collections.Immutable.ImmutableSortedDictionary<string,Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode> RawIndex { get; }
9+
public System.Collections.Immutable.ImmutableSortedDictionary<Atypical.VirtualFileSystem.Core.Abstractions.VFSPath,Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode> RawIndex { get; }
1010
```
1111

1212
#### Property Value
13-
[System.Collections.Immutable.ImmutableSortedDictionary&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Immutable.ImmutableSortedDictionary-2 'System.Collections.Immutable.ImmutableSortedDictionary`2')[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Immutable.ImmutableSortedDictionary-2 'System.Collections.Immutable.ImmutableSortedDictionary`2')[IVirtualFileSystemNode](IVirtualFileSystemNode.md 'Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Immutable.ImmutableSortedDictionary-2 'System.Collections.Immutable.ImmutableSortedDictionary`2')
13+
[System.Collections.Immutable.ImmutableSortedDictionary&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Immutable.ImmutableSortedDictionary-2 'System.Collections.Immutable.ImmutableSortedDictionary`2')[VFSPath](VFSPath.md 'Atypical.VirtualFileSystem.Core.Abstractions.VFSPath')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Immutable.ImmutableSortedDictionary-2 'System.Collections.Immutable.ImmutableSortedDictionary`2')[IVirtualFileSystemNode](IVirtualFileSystemNode.md 'Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Immutable.ImmutableSortedDictionary-2 'System.Collections.Immutable.ImmutableSortedDictionary`2')
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#### [Atypical.VirtualFileSystem.Core](VirtualFileSystem.md 'VirtualFileSystem')
22
### [Atypical.VirtualFileSystem.Core](VirtualFileSystem.md#Atypical.VirtualFileSystem.Core 'Atypical.VirtualFileSystem.Core').[VFSIndex](VFSIndex.md 'Atypical.VirtualFileSystem.Core.VFSIndex')
33

4-
## VFSIndex.Remove(string) Method
4+
## VFSIndex.Remove(VFSPath) Method
55

66
Removes the node with the specified key.
77

88
```csharp
9-
public void Remove(string key);
9+
public void Remove(Atypical.VirtualFileSystem.Core.Abstractions.VFSPath key);
1010
```
1111
#### Parameters
1212

13-
<a name='Atypical.VirtualFileSystem.Core.VFSIndex.Remove(string).key'></a>
13+
<a name='Atypical.VirtualFileSystem.Core.VFSIndex.Remove(Atypical.VirtualFileSystem.Core.Abstractions.VFSPath).key'></a>
1414

15-
`key` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')
15+
`key` [VFSPath](VFSPath.md 'Atypical.VirtualFileSystem.Core.Abstractions.VFSPath')
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#### [Atypical.VirtualFileSystem.Core](VirtualFileSystem.md 'VirtualFileSystem')
2+
### [Atypical.VirtualFileSystem.Core](VirtualFileSystem.md#Atypical.VirtualFileSystem.Core 'Atypical.VirtualFileSystem.Core').[VFSIndex](VFSIndex.md 'Atypical.VirtualFileSystem.Core.VFSIndex')
3+
4+
## VFSIndex.TryAdd(VFSPath, IVirtualFileSystemNode) Method
5+
6+
Tries to add the specified node to the index.
7+
8+
```csharp
9+
public bool TryAdd(Atypical.VirtualFileSystem.Core.Abstractions.VFSPath pathValue, Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode node);
10+
```
11+
#### Parameters
12+
13+
<a name='Atypical.VirtualFileSystem.Core.VFSIndex.TryAdd(Atypical.VirtualFileSystem.Core.Abstractions.VFSPath,Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode).pathValue'></a>
14+
15+
`pathValue` [VFSPath](VFSPath.md 'Atypical.VirtualFileSystem.Core.Abstractions.VFSPath')
16+
17+
<a name='Atypical.VirtualFileSystem.Core.VFSIndex.TryAdd(Atypical.VirtualFileSystem.Core.Abstractions.VFSPath,Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode).node'></a>
18+
19+
`node` [IVirtualFileSystemNode](IVirtualFileSystemNode.md 'Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode')
20+
21+
#### Returns
22+
[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')

docs/api/VFSIndex.TryAdd(string,IVirtualFileSystemNode).md

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#### [Atypical.VirtualFileSystem.Core](VirtualFileSystem.md 'VirtualFileSystem')
2+
### [Atypical.VirtualFileSystem.Core](VirtualFileSystem.md#Atypical.VirtualFileSystem.Core 'Atypical.VirtualFileSystem.Core').[VFSIndex](VFSIndex.md 'Atypical.VirtualFileSystem.Core.VFSIndex')
3+
4+
## VFSIndex.TryGetValue(VFSPath, IVirtualFileSystemNode) Method
5+
6+
Tries to get the value associated with the specified key.
7+
8+
```csharp
9+
public bool TryGetValue(Atypical.VirtualFileSystem.Core.Abstractions.VFSPath key, out Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode value);
10+
```
11+
#### Parameters
12+
13+
<a name='Atypical.VirtualFileSystem.Core.VFSIndex.TryGetValue(Atypical.VirtualFileSystem.Core.Abstractions.VFSPath,Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode).key'></a>
14+
15+
`key` [VFSPath](VFSPath.md 'Atypical.VirtualFileSystem.Core.Abstractions.VFSPath')
16+
17+
<a name='Atypical.VirtualFileSystem.Core.VFSIndex.TryGetValue(Atypical.VirtualFileSystem.Core.Abstractions.VFSPath,Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode).value'></a>
18+
19+
`value` [IVirtualFileSystemNode](IVirtualFileSystemNode.md 'Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode')
20+
21+
#### Returns
22+
[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')

docs/api/VFSIndex.TryGetValue(string,IVirtualFileSystemNode).md

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/api/VFSIndex.Values.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
Gets the values of the raw index.
77

88
```csharp
9-
public System.Collections.Generic.SortedDictionary<string,Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode>.ValueCollection Values { get; }
9+
public System.Collections.Generic.SortedDictionary<Atypical.VirtualFileSystem.Core.Abstractions.VFSPath,Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode>.ValueCollection Values { get; }
1010
```
1111

1212
#### Property Value
13-
[System.Collections.Generic.SortedDictionary.ValueCollection&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.SortedDictionary-2.ValueCollection 'System.Collections.Generic.SortedDictionary`2.ValueCollection')[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.SortedDictionary-2.ValueCollection 'System.Collections.Generic.SortedDictionary`2.ValueCollection')[IVirtualFileSystemNode](IVirtualFileSystemNode.md 'Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.SortedDictionary-2.ValueCollection 'System.Collections.Generic.SortedDictionary`2.ValueCollection')
13+
[System.Collections.Generic.SortedDictionary.ValueCollection&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.SortedDictionary-2.ValueCollection 'System.Collections.Generic.SortedDictionary`2.ValueCollection')[VFSPath](VFSPath.md 'Atypical.VirtualFileSystem.Core.Abstractions.VFSPath')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.SortedDictionary-2.ValueCollection 'System.Collections.Generic.SortedDictionary`2.ValueCollection')[IVirtualFileSystemNode](IVirtualFileSystemNode.md 'Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.SortedDictionary-2.ValueCollection 'System.Collections.Generic.SortedDictionary`2.ValueCollection')

0 commit comments

Comments
 (0)