Skip to content

Commit 618e239

Browse files
committed
Url - writeable Path, other minor tweaks
1 parent 1b4358a commit 618e239

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

Flurl.sln

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25123.0
4+
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CF0659E1-9C0D-4D35-8FBA-CC5E94619853}"
77
EndProject
@@ -45,18 +45,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuspec", "nuspec", "{E41F60
4545
EndProject
4646
Global
4747
GlobalSection(SharedMSBuildProjectFiles) = preSolution
48-
Test\Flurl.Test.Shared\Flurl.Test.Shared.projitems*{4c7c0861-84f6-436e-8fa6-4c318b336a7b}*SharedItemsImports = 13
48+
PackageTesters\PackageTester.Shared\PackageTester.Shared.projitems*{0a32978c-bc48-4dfb-b1f7-b88541b0d686}*SharedItemsImports = 4
4949
PackageTesters\PackageTester.Shared\PackageTester.Shared.projitems*{19c1befd-9df7-4efa-9d7d-37b0dc6eef54}*SharedItemsImports = 13
50-
Test\Flurl.Test.Shared\Flurl.Test.Shared.projitems*{49cb777f-d13d-401a-9206-48a6b2ecb276}*SharedItemsImports = 4
50+
src\Flurl.Http.Shared\Flurl.Http.Shared.projitems*{3f6be828-fa29-429e-99e1-f1fcdfdc1205}*SharedItemsImports = 4
51+
src\Flurl.Shared\Flurl.Shared.projitems*{3f6be828-fa29-429e-99e1-f1fcdfdc1205}*SharedItemsImports = 4
52+
Test\Flurl.Test.Shared\Flurl.Test.Shared.projitems*{3f6be828-fa29-429e-99e1-f1fcdfdc1205}*SharedItemsImports = 4
5153
src\Flurl.Http.Shared\Flurl.Http.Shared.projitems*{49cb777f-d13d-401a-9206-48a6b2ecb276}*SharedItemsImports = 4
5254
src\Flurl.Shared\Flurl.Shared.projitems*{49cb777f-d13d-401a-9206-48a6b2ecb276}*SharedItemsImports = 4
53-
PackageTesters\PackageTester.Shared\PackageTester.Shared.projitems*{d00a7c13-ab11-46f0-a694-8986dec6ac5d}*SharedItemsImports = 4
54-
PackageTesters\PackageTester.Shared\PackageTester.Shared.projitems*{0a32978c-bc48-4dfb-b1f7-b88541b0d686}*SharedItemsImports = 4
55+
Test\Flurl.Test.Shared\Flurl.Test.Shared.projitems*{49cb777f-d13d-401a-9206-48a6b2ecb276}*SharedItemsImports = 4
56+
Test\Flurl.Test.Shared\Flurl.Test.Shared.projitems*{4c7c0861-84f6-436e-8fa6-4c318b336a7b}*SharedItemsImports = 13
5557
src\Flurl.Http.Shared\Flurl.Http.Shared.projitems*{734e6962-97e2-4318-9a2d-c87e76921afb}*SharedItemsImports = 13
58+
PackageTesters\PackageTester.Shared\PackageTester.Shared.projitems*{d00a7c13-ab11-46f0-a694-8986dec6ac5d}*SharedItemsImports = 4
5659
src\Flurl.Shared\Flurl.Shared.projitems*{ed944c76-9613-474e-9861-54e41a3e77cd}*SharedItemsImports = 13
57-
Test\Flurl.Test.Shared\Flurl.Test.Shared.projitems*{3f6be828-fa29-429e-99e1-f1fcdfdc1205}*SharedItemsImports = 4
58-
src\Flurl.Http.Shared\Flurl.Http.Shared.projitems*{3f6be828-fa29-429e-99e1-f1fcdfdc1205}*SharedItemsImports = 4
59-
src\Flurl.Shared\Flurl.Shared.projitems*{3f6be828-fa29-429e-99e1-f1fcdfdc1205}*SharedItemsImports = 4
6060
EndGlobalSection
6161
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6262
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU

src/Flurl.Shared/Url.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class Url
1313
/// <summary>
1414
/// The full absolute path part of the URL (everthing except the query and fragment).
1515
/// </summary>
16-
public string Path { get; private set; }
16+
public string Path { get; set; }
1717

1818
/// <summary>
1919
/// The query part of the URL (after the ?, RFC 3986).
@@ -24,14 +24,14 @@ public string Query {
2424
}
2525

2626
/// <summary>
27-
/// Query parsed to name/value pairs.
27+
/// The fragment part of the URL (after the #, RFC 3986).
2828
/// </summary>
29-
public QueryParamCollection QueryParams { get; private set; }
29+
public string Fragment { get; set; }
3030

3131
/// <summary>
32-
/// The fragment part of the URL (after the #, RFC 3986).
32+
/// Query parsed to name/value pairs.
3333
/// </summary>
34-
public string Fragment { get; set; }
34+
public QueryParamCollection QueryParams { get; private set; }
3535

3636
/// <summary>
3737
/// Constructs a Url object from a string.
@@ -332,7 +332,7 @@ public override string ToString() {
332332
public string ToString(bool encodeSpaceAsPlus) {
333333
var sb = new System.Text.StringBuilder(Path);
334334
if (Query.Length > 0)
335-
sb.Append("?").Append(Query);
335+
sb.Append("?").Append(QueryParams.ToString(encodeSpaceAsPlus));
336336
if (Fragment.Length > 0)
337337
sb.Append("#").Append(Fragment);
338338
return sb.ToString();

0 commit comments

Comments
 (0)