code guidelines
This commit is contained in:
parent
58fb8cd530
commit
492427f4b8
82 changed files with 470 additions and 375 deletions
|
|
@ -18,11 +18,13 @@ namespace Yavsc.Helpers
|
|||
|
||||
public static Stream GetStream(StreamReader reader)
|
||||
{
|
||||
var procStart = new ProcessStartInfo("node", "node_modules/ansi-to-html/bin/ansi-to-html");
|
||||
procStart.UseShellExecute = false;
|
||||
procStart.RedirectStandardInput = true;
|
||||
procStart.RedirectStandardOutput = true;
|
||||
// procStart.RedirectStandardError = true;
|
||||
var procStart = new ProcessStartInfo("node", "node_modules/ansi-to-html/bin/ansi-to-html")
|
||||
{
|
||||
UseShellExecute = false,
|
||||
RedirectStandardInput = true,
|
||||
RedirectStandardOutput = true
|
||||
};
|
||||
// procStart.RedirectStandardError = true;
|
||||
var mem = new MemoryStream();
|
||||
var writer = new StreamWriter(mem);
|
||||
var proc = Process.Start(procStart);
|
||||
|
|
@ -54,4 +56,4 @@ namespace Yavsc.Helpers
|
|||
return GetStream(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ namespace Yavsc.Helpers
|
|||
|
||||
public static class EventHelpers
|
||||
{
|
||||
public static RdvQueryEvent CreateEvent(this RdvQuery query,
|
||||
IStringLocalizer SR, string subtopic)
|
||||
public static RdvQueryEvent CreateEvent(this RdvQuery query, string subtopic)
|
||||
{
|
||||
var yaev = new RdvQueryEvent(subtopic)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,10 +21,11 @@ namespace Yavsc.Helpers
|
|||
{
|
||||
public static FileRecievedInfo ReceiveProSignature(this ClaimsPrincipal user, string billingCode, long estimateId, IFormFile formFile, string signtype)
|
||||
{
|
||||
var item = new FileRecievedInfo();
|
||||
item.FileName = AbstractFileSystemHelpers.SignFileNameFormat("pro",billingCode,estimateId);
|
||||
item.MimeType = formFile.ContentDisposition;
|
||||
|
||||
var item = new FileRecievedInfo
|
||||
{
|
||||
FileName = AbstractFileSystemHelpers.SignFileNameFormat("pro", billingCode, estimateId)
|
||||
};
|
||||
|
||||
var destFileName = Path.Combine(Startup.SiteSetup.Bills, item.FileName);
|
||||
|
||||
var fi = new FileInfo(destFileName);
|
||||
|
|
@ -200,10 +201,11 @@ namespace Yavsc.Helpers
|
|||
// this process is not safe at concurrent access.
|
||||
long usage = user.DiskUsage;
|
||||
|
||||
var item = new FileRecievedInfo();
|
||||
item.FileName = AbstractFileSystemHelpers.FilterFileName (destFileName);
|
||||
item.MimeType = contentType;
|
||||
item.DestDir = root;
|
||||
var item = new FileRecievedInfo
|
||||
{
|
||||
FileName = AbstractFileSystemHelpers.FilterFileName(destFileName),
|
||||
DestDir = root
|
||||
};
|
||||
var fi = new FileInfo(Path.Combine(root, item.FileName));
|
||||
if (fi.Exists)
|
||||
{
|
||||
|
|
@ -251,8 +253,10 @@ namespace Yavsc.Helpers
|
|||
|
||||
public static FileRecievedInfo ReceiveAvatar(this ApplicationUser user, IFormFile formFile)
|
||||
{
|
||||
var item = new FileRecievedInfo();
|
||||
item.FileName = user.UserName + ".png";
|
||||
var item = new FileRecievedInfo
|
||||
{
|
||||
FileName = user.UserName + ".png"
|
||||
};
|
||||
|
||||
var destFileName = Path.Combine(Startup.SiteSetup.Avatars, item.FileName);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue