Skip to content

Commit

Permalink
Format with csharpier
Browse files Browse the repository at this point in the history
  • Loading branch information
toburger committed Aug 18, 2022
1 parent 4caa053 commit e2dbc82
Show file tree
Hide file tree
Showing 218 changed files with 28,722 additions and 10,858 deletions.
685 changes: 577 additions & 108 deletions CDB/GetAccommodationDataCDB.cs

Large diffs are not rendered by default.

41 changes: 30 additions & 11 deletions DSS/GetDSSData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@ public class GetDSSData

public const string serviceurlslopebase = "pistebasis";
public const string serviceurlslopestatus = "pistenstatus";

private static async Task<HttpResponseMessage> RequestDSSInfo(DSSRequestType dssRequestType, string dssuser, string dsspswd, string serviceurl)

private static async Task<HttpResponseMessage> RequestDSSInfo(
DSSRequestType dssRequestType,
string dssuser,
string dsspswd,
string serviceurl
)
{
try
{
switch(dssRequestType)
{
switch (dssRequestType)
{
case DSSRequestType.liftbase:
case DSSRequestType.liftbase:
serviceurl = serviceurl + serviceurlliftbase;
break;
case DSSRequestType.liftstatus:
Expand Down Expand Up @@ -53,19 +58,33 @@ private static async Task<HttpResponseMessage> RequestDSSInfo(DSSRequestType dss
}
catch (Exception ex)
{
return new HttpResponseMessage { StatusCode = HttpStatusCode.BadRequest, Content = new StringContent(ex.Message) };
return new HttpResponseMessage
{
StatusCode = HttpStatusCode.BadRequest,
Content = new StringContent(ex.Message)
};
}
}

public static async Task<dynamic?> GetDSSDataAsync(DSSRequestType dssRequestType, string dssuser, string dsspswd, string serviceurl)

public static async Task<dynamic?> GetDSSDataAsync(
DSSRequestType dssRequestType,
string dssuser,
string dsspswd,
string serviceurl
)
{
//Request
HttpResponseMessage response = await RequestDSSInfo(dssRequestType, dssuser, dsspswd, serviceurl);
HttpResponseMessage response = await RequestDSSInfo(
dssRequestType,
dssuser,
dsspswd,
serviceurl
);
//Parse JSON Response to
var responsetask = await response.Content.ReadAsStringAsync();
dynamic? responseobject = JsonConvert.DeserializeObject(responsetask);

return responseobject;
}
}
}
}
}
Loading

0 comments on commit e2dbc82

Please sign in to comment.