add to git
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
namespace CodeEditorApi
|
||||
{
|
||||
public class SessionData
|
||||
{
|
||||
public DateTime Timestamp { get; set; }
|
||||
public Guid SessionId { get; set; }
|
||||
public object Data { get; set; } = default!;
|
||||
public DataType Type { get; set; }
|
||||
|
||||
public string FileName
|
||||
{
|
||||
get
|
||||
{
|
||||
return SessionId.ToString() + "/" + Helpers.SessionFiles.GetFormattedDate(Timestamp) + FileExtension;
|
||||
}
|
||||
}
|
||||
|
||||
public string FileExtension {
|
||||
get
|
||||
{
|
||||
if (Type == DataType.Javascript)
|
||||
{
|
||||
return ".js";
|
||||
}
|
||||
else if (Type == DataType.CSS)
|
||||
{
|
||||
return ".css";
|
||||
}
|
||||
else if (Type == DataType.HTML)
|
||||
{
|
||||
return ".html";
|
||||
}
|
||||
|
||||
return ".txt";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum DataType
|
||||
{
|
||||
Javascript,
|
||||
HTML,
|
||||
CSS,
|
||||
Text
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user