principalement du format de code

This commit is contained in:
Paul Schneider 2020-09-12 01:11:30 +01:00
commit ff1444d664
87 changed files with 510 additions and 550 deletions

View file

@ -16,13 +16,14 @@ namespace Yavsc.Authentication
{
}
string clientId;
string clientSecret;
string scope;
Uri authorizeUrl;
Uri accessTokenUrl;
Uri redirectUrl;
GetUsernameAsyncFunc getUsernameAsync;
readonly string clientId;
readonly string clientSecret;
readonly string scope;
readonly Uri authorizeUrl;
readonly Uri accessTokenUrl;
readonly Uri redirectUrl;
readonly GetUsernameAsyncFunc getUsernameAsync;
string requestState;
bool reportedForgery = false;

View file

@ -48,7 +48,7 @@ namespace Yavsc
public const string YavscConnectionStringEnvName = "YAVSC_DB_CONNECTION";
// at the end, let 4*4 bytes in peace
public const int WebSocketsMaxBufLen = 4 * 1020;
public const int WebSocketsMaxBufLen = 4096;
public static readonly long DefaultFSQ = 1024 * 1024 * 500;

View file

@ -10,7 +10,7 @@ namespace Yavsc.Helpers
{
public static string UserBillsDirName { set; get; }
public static string UserFilesDirName { set; get; }
/// <summary>
/// Is Valid this Path?
/// Return true when given value is a valid user file sub-path,
@ -37,7 +37,7 @@ namespace Yavsc.Helpers
{
return !name.Any(c => !ValidFileNameChars.Contains(c));
}
// Ensure this path is canonical,
// No "dirto/./this", neither "dirt/to/that/"
// no .. and each char must be listed as valid in constants
@ -49,11 +49,11 @@ namespace Yavsc.Helpers
{
if (ValidFileNameChars.Contains(c))
sb.Append(c);
else sb.Append("#"+((int)c).ToString("D3"));
else sb.Append("#" + ((int)c).ToString("D3"));
}
return sb.ToString();
return sb.ToString();
}
public static UserDirectoryInfo GetUserFiles(string userName, string subdir)
{
UserDirectoryInfo di = new UserDirectoryInfo(UserFilesDirName, userName, subdir);
@ -71,10 +71,10 @@ namespace Yavsc.Helpers
// Only accept descent remote file names
public static char[] ValidFileNameChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-=_~. %#".ToCharArray();
// Estimate signature file name format
public static Func<string,string,long,string>
SignFileNameFormat = new Func<string,string,long,string> ((signType,billingCode,estimateId) => $"sign-{billingCode}-{signType}-{estimateId}.png");
public static Func<string, string, long, string>
SignFileNameFormat = new Func<string, string, long, string>((signType, billingCode, estimateId) => $"sign-{billingCode}-{signType}-{estimateId}.png");
}
}

View file

@ -3,7 +3,7 @@ namespace Yavsc.Models.Process
{
public class Negation<Exp> : IRequisition where Exp : IRequisition
{
Exp _expression;
readonly Exp _expression;
public Negation(Exp expression)
{
_expression = expression;

View file

@ -24,11 +24,14 @@
"Chat"
]
},
"buildOptions": {
"nowarn": ["IDE1006"]
},
"tooling": {
"defaultNamespace": "Yavsc"
},
"dependencies": {
"Newtonsoft.Json": "6.0.1-beta1"
"Newtonsoft.Json": "7.0.1"
},
"frameworks": {
"dnx451": {