aboutsummaryrefslogtreecommitdiff
path: root/ExamTemplate/Common/ExamTemplate.Common
diff options
context:
space:
mode:
Diffstat (limited to 'ExamTemplate/Common/ExamTemplate.Common')
-rw-r--r--ExamTemplate/Common/ExamTemplate.Common/ErrorMessages.cs12
-rw-r--r--ExamTemplate/Common/ExamTemplate.Common/ExamTemplate.Common.csproj7
-rw-r--r--ExamTemplate/Common/ExamTemplate.Common/RoleConst.cs17
3 files changed, 36 insertions, 0 deletions
diff --git a/ExamTemplate/Common/ExamTemplate.Common/ErrorMessages.cs b/ExamTemplate/Common/ExamTemplate.Common/ErrorMessages.cs
new file mode 100644
index 0000000..fa15b8c
--- /dev/null
+++ b/ExamTemplate/Common/ExamTemplate.Common/ErrorMessages.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace ExamTemplate.Common
+{
+ public static class ErrorMessages
+ {
+ public static string NullObject(Type t)
+ {
+ return String.Format("{0} cannot be null!", t);
+ }
+ }
+}
diff --git a/ExamTemplate/Common/ExamTemplate.Common/ExamTemplate.Common.csproj b/ExamTemplate/Common/ExamTemplate.Common/ExamTemplate.Common.csproj
new file mode 100644
index 0000000..563e6f9
--- /dev/null
+++ b/ExamTemplate/Common/ExamTemplate.Common/ExamTemplate.Common.csproj
@@ -0,0 +1,7 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>net5.0</TargetFramework>
+ </PropertyGroup>
+
+</Project>
diff --git a/ExamTemplate/Common/ExamTemplate.Common/RoleConst.cs b/ExamTemplate/Common/ExamTemplate.Common/RoleConst.cs
new file mode 100644
index 0000000..7d72fea
--- /dev/null
+++ b/ExamTemplate/Common/ExamTemplate.Common/RoleConst.cs
@@ -0,0 +1,17 @@
+using System.Collections.Generic;
+
+namespace ExamTemplate.Common
+{
+ public static class RoleConst
+ {
+ public const string User = "User";
+ public const string Admin = "Administrator";
+
+ public static List<string> GetAllNames()
+ {
+ return new List<string>() {
+ User, Admin
+ };
+ }
+ }
+}