CSLA - R to Z

This commit is contained in:
2026-09-14 15:30:10 -04:00
parent d238d6aed2
commit 1c6f3e3e3c
32 changed files with 1978 additions and 4455 deletions
+123 -268
View File
@@ -13,8 +13,6 @@ using System.Data;
using System.Data.SqlClient;
using Csla;
using Csla.Data;
using System.Configuration;
using System.IO;
using System.ComponentModel;
using System.Collections.Generic;
using Csla.Validation;
@@ -37,10 +35,7 @@ namespace VEPROMS.CSLA.Library
if (IsDirty)
refreshRoUsages.Add(this);
}
private void ClearRefreshList()
{
_RefreshRoUsages = new List<RoUsage>();
}
private void ClearRefreshList() => _RefreshRoUsages = new List<RoUsage>();
private void BuildRefreshList()
{
ClearRefreshList();
@@ -58,6 +53,7 @@ namespace VEPROMS.CSLA.Library
}
#endregion
#region Collection
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
private static List<RoUsage> _CacheList = new List<RoUsage>();
protected static void AddToCache(RoUsage roUsage)
{
@@ -67,6 +63,7 @@ namespace VEPROMS.CSLA.Library
{
while (_CacheList.Contains(roUsage)) _CacheList.Remove(roUsage); // In RemoveFromCache
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
private static Dictionary<string, List<RoUsage>> _CacheByPrimaryKey = new Dictionary<string, List<RoUsage>>();
private static void ConvertListToDictionary()
{
@@ -92,15 +89,9 @@ namespace VEPROMS.CSLA.Library
#endregion
#region Business Methods
private string _ErrorMessage = string.Empty;
public string ErrorMessage
{
get { return _ErrorMessage; }
}
public string ErrorMessage => _ErrorMessage;
private static int _nextROUsageID = -1;
public static int NextROUsageID
{
get { return _nextROUsageID--; }
}
public static int NextROUsageID => _nextROUsageID--;
private int _ROUsageID;
[System.ComponentModel.DataObjectField(true, true)]
public int ROUsageID
@@ -261,37 +252,22 @@ namespace VEPROMS.CSLA.Library
if (base.IsDirty || list.Contains(this))
return base.IsDirty;
list.Add(this);
return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirtyList(list)) || (_MyRODb == null ? false : _MyRODb.IsDirtyList(list));
}
public override bool IsValid
{
get { return IsValidList(new List<object>()); }
return base.IsDirty || (_MyContent != null && _MyContent.IsDirtyList(list)) || (_MyRODb != null && _MyRODb.IsDirtyList(list));
}
public override bool IsValid => IsValidList(new List<object>());
public bool IsValidList(List<object> list)
{
if (list.Contains(this))
return (IsNew && !IsDirty) ? true : base.IsValid;
return (IsNew && !IsDirty) || base.IsValid;
list.Add(this);
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValidList(list)) && (_MyRODb == null ? true : _MyRODb.IsValidList(list));
return ((IsNew && !IsDirty) || base.IsValid) && (_MyContent == null || _MyContent.IsValidList(list)) && (_MyRODb == null || _MyRODb.IsValidList(list));
}
// CSLATODO: Replace base RoUsage.ToString function as necessary
/// <summary>
/// Overrides Base ToString
/// </summary>
/// <returns>A string representation of current RoUsage</returns>
//public override string ToString()
//{
// return base.ToString();
//}
// CSLATODO: Check RoUsage.GetIdValue to assure that the ID returned is unique
/// <summary>
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality
/// </summary>
/// <returns>A Unique ID for the current RoUsage</returns>
protected override object GetIdValue()
{
return MyRoUsageUnique; // Absolutely Unique ID
}
protected override object GetIdValue() => MyRoUsageUnique; // Absolutely Unique ID
#endregion
#region ValidationRules
[NonSerialized]
@@ -321,8 +297,8 @@ namespace VEPROMS.CSLA.Library
get
{
IVEHasBrokenRules hasBrokenRules = HasBrokenRules;
if (this.Equals(hasBrokenRules)) return BrokenRulesCollection;
return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null);
if (Equals(hasBrokenRules)) return BrokenRulesCollection;
return hasBrokenRules?.BrokenRules;
}
}
protected override void AddBusinessRules()
@@ -369,35 +345,11 @@ namespace VEPROMS.CSLA.Library
}
return true;
}
// Sample data comparison validation rule
//private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e)
//{
// if (_started > _ended)
// {
// e.Description = "Start date can't be after end date";
// return false;
// }
// else
// return true;
//}
#endregion
#region Authorization Rules
protected override void AddAuthorizationRules()
{
//CSLATODO: Who can read/write which fields
//AuthorizationRules.AllowRead(ROUsageID, "<Role(s)>");
//AuthorizationRules.AllowRead(ContentID, "<Role(s)>");
//AuthorizationRules.AllowRead(ROID, "<Role(s)>");
//AuthorizationRules.AllowRead(Config, "<Role(s)>");
//AuthorizationRules.AllowRead(DTS, "<Role(s)>");
//AuthorizationRules.AllowRead(UserID, "<Role(s)>");
//AuthorizationRules.AllowRead(RODbID, "<Role(s)>");
//AuthorizationRules.AllowWrite(ContentID, "<Role(s)>");
//AuthorizationRules.AllowWrite(ROID, "<Role(s)>");
//AuthorizationRules.AllowWrite(Config, "<Role(s)>");
//AuthorizationRules.AllowWrite(DTS, "<Role(s)>");
//AuthorizationRules.AllowWrite(UserID, "<Role(s)>");
//AuthorizationRules.AllowWrite(RODbID, "<Role(s)>");
_RoUsageExtension.AddAuthorizationRules(AuthorizationRules);
}
protected override void AddInstanceAuthorizationRules()
@@ -405,42 +357,14 @@ namespace VEPROMS.CSLA.Library
//CSLATODO: Who can read/write which fields
_RoUsageExtension.AddInstanceAuthorizationRules(AuthorizationRules);
}
public static bool CanAddObject()
{
// CSLATODO: Can Add Authorization
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
return true;
}
public static bool CanGetObject()
{
// CSLATODO: CanGet Authorization
return true;
}
public static bool CanDeleteObject()
{
// CSLATODO: CanDelete Authorization
//bool result = false;
//if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true;
//if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true;
//return result;
return true;
}
public static bool CanEditObject()
{
// CSLATODO: CanEdit Authorization
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
return true;
}
#endregion
#region Factory Methods
public int CurrentEditLevel
{ get { return EditLevel; } }
public int CurrentEditLevel => EditLevel;
private static int _RoUsageUnique = 0;
protected static int RoUsageUnique
{ get { return ++_RoUsageUnique; } }
private int _MyRoUsageUnique = RoUsageUnique;
public int MyRoUsageUnique // Absolutely Unique ID - Editable
{ get { return _MyRoUsageUnique; } }
protected static int RoUsageUnique => ++_RoUsageUnique;
private readonly int _MyRoUsageUnique = RoUsageUnique;
// Absolutely Unique ID - Editable
public int MyRoUsageUnique => _MyRoUsageUnique;
protected RoUsage()
{/* require use of factory methods */
AddToCache(this);
@@ -449,15 +373,11 @@ namespace VEPROMS.CSLA.Library
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
private static int IncrementCountCreated => ++_CountCreated;
private readonly int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated => _CountCreated;
public static int CountNotDisposed => _CountCreated - _CountDisposed;
public static int CountNotFinalized => _CountCreated - _CountFinalized;
~RoUsage()
{
_CountFinalized++;
@@ -482,8 +402,6 @@ namespace VEPROMS.CSLA.Library
}
public static RoUsage New()
{
if (!CanAddObject())
throw new System.Security.SecurityException("User not authorized to add a RoUsage");
try
{
return DataPortal.Create<RoUsage>();
@@ -554,8 +472,6 @@ namespace VEPROMS.CSLA.Library
}
public static RoUsage Get(int rOUsageID)
{
if (!CanGetObject())
throw new System.Security.SecurityException("User not authorized to view a RoUsage");
try
{
RoUsage tmp = GetCachedByPrimaryKey(rOUsageID);
@@ -576,19 +492,10 @@ namespace VEPROMS.CSLA.Library
throw new DbCslaException("Error on RoUsage.Get", ex);
}
}
public static RoUsage Get(SafeDataReader dr)
{
if (dr.Read()) return new RoUsage(dr);
return null;
}
internal RoUsage(SafeDataReader dr)
{
ReadData(dr);
}
public static RoUsage Get(SafeDataReader dr) => dr.Read() ? new RoUsage(dr) : null;
internal RoUsage(SafeDataReader dr) => ReadData(dr);
public static void Delete(int rOUsageID)
{
if (!CanDeleteObject())
throw new System.Security.SecurityException("User not authorized to remove a RoUsage");
try
{
DataPortal.Delete(new PKCriteria(rOUsageID));
@@ -600,12 +507,6 @@ namespace VEPROMS.CSLA.Library
}
public override RoUsage Save()
{
if (IsDeleted && !CanDeleteObject())
throw new System.Security.SecurityException("User not authorized to remove a RoUsage");
else if (IsNew && !CanAddObject())
throw new System.Security.SecurityException("User not authorized to add a RoUsage");
else if (!CanEditObject())
throw new System.Security.SecurityException("User not authorized to update a RoUsage");
try
{
BuildRefreshList();
@@ -625,13 +526,9 @@ namespace VEPROMS.CSLA.Library
[Serializable()]
protected class PKCriteria
{
private int _ROUsageID;
public int ROUsageID
{ get { return _ROUsageID; } }
public PKCriteria(int rOUsageID)
{
_ROUsageID = rOUsageID;
}
private readonly int _ROUsageID;
public int ROUsageID => _ROUsageID;
public PKCriteria(int rOUsageID) => _ROUsageID = rOUsageID;
}
// CSLATODO: If Create needs to access DB - It should not be marked RunLocal
[RunLocal()]
@@ -731,37 +628,44 @@ namespace VEPROMS.CSLA.Library
[Transactional(TransactionalTypes.TransactionScope)]
internal void SQLInsert()
{
if (!this.IsDirty) return;
if (!IsDirty) return;
try
{
if (_MyContent != null) _MyContent.Update();
if (_MyRODb != null) _MyRODb.Update();
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
using (SqlCommand cm = cn.CreateCommand())
_MyContent?.Update();
_MyRODb?.Update();
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addRoUsage";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ContentID", ContentID);
cm.Parameters.AddWithValue("@ROID", _ROID);
cm.Parameters.AddWithValue("@Config", _Config);
if (_DTS.Year >= 1753 && _DTS.Year <= 9999) cm.Parameters.AddWithValue("@DTS", _DTS);
cm.Parameters.AddWithValue("@UserID", _UserID);
cm.Parameters.AddWithValue("@RODbID", RODbID);
// Output Calculated Columns
SqlParameter param_ROUsageID = new SqlParameter("@newROUsageID", SqlDbType.Int);
param_ROUsageID.Direction = ParameterDirection.Output;
cm.Parameters.Add(param_ROUsageID);
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
param_LastChanged.Direction = ParameterDirection.Output;
cm.Parameters.Add(param_LastChanged);
// CSLATODO: Define any additional output parameters
cm.ExecuteNonQuery();
// Save all values being returned from the Procedure
_ROUsageID = (int)cm.Parameters["@newROUsageID"].Value;
_LastChanged = (byte[])cm.Parameters["@newLastChanged"].Value;
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addRoUsage";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ContentID", ContentID);
cm.Parameters.AddWithValue("@ROID", _ROID);
cm.Parameters.AddWithValue("@Config", _Config);
if (_DTS.Year >= 1753 && _DTS.Year <= 9999) cm.Parameters.AddWithValue("@DTS", _DTS);
cm.Parameters.AddWithValue("@UserID", _UserID);
cm.Parameters.AddWithValue("@RODbID", RODbID);
// Output Calculated Columns
SqlParameter param_ROUsageID = new SqlParameter("@newROUsageID", SqlDbType.Int)
{
Direction = ParameterDirection.Output
};
cm.Parameters.Add(param_ROUsageID);
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp)
{
Direction = ParameterDirection.Output
};
cm.Parameters.Add(param_LastChanged);
// CSLATODO: Define any additional output parameters
cm.ExecuteNonQuery();
// Save all values being returned from the Procedure
_ROUsageID = (int)cm.Parameters["@newROUsageID"].Value;
_LastChanged = (byte[])cm.Parameters["@newLastChanged"].Value;
}
}
MarkOld();
// update child objects
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] RoUsage.SQLInsert", GetHashCode());
@@ -792,11 +696,15 @@ namespace VEPROMS.CSLA.Library
cm.Parameters.AddWithValue("@UserID", userID);
cm.Parameters.AddWithValue("@RODbID", myRODb.RODbID);
// Output Calculated Columns
SqlParameter param_ROUsageID = new SqlParameter("@newROUsageID", SqlDbType.Int);
param_ROUsageID.Direction = ParameterDirection.Output;
SqlParameter param_ROUsageID = new SqlParameter("@newROUsageID", SqlDbType.Int)
{
Direction = ParameterDirection.Output
};
cm.Parameters.Add(param_ROUsageID);
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
param_LastChanged.Direction = ParameterDirection.Output;
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp)
{
Direction = ParameterDirection.Output
};
cm.Parameters.Add(param_LastChanged);
// CSLATODO: Define any additional output parameters
cm.ExecuteNonQuery();
@@ -841,35 +749,40 @@ namespace VEPROMS.CSLA.Library
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] RoUsage.SQLUpdate", GetHashCode());
try
{
if (_MyContent != null) _MyContent.Update();
if (_MyRODb != null) _MyRODb.Update();
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
if (base.IsDirty)
_MyContent?.Update();
_MyRODb?.Update();
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
{
using (SqlCommand cm = cn.CreateCommand())
if (base.IsDirty)
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateRoUsage";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@ROUsageID", _ROUsageID);
cm.Parameters.AddWithValue("@ContentID", ContentID);
cm.Parameters.AddWithValue("@ROID", _ROID);
cm.Parameters.AddWithValue("@Config", _Config);
if (_DTS.Year >= 1753 && _DTS.Year <= 9999) cm.Parameters.AddWithValue("@DTS", _DTS);
cm.Parameters.AddWithValue("@UserID", _UserID);
cm.Parameters.AddWithValue("@LastChanged", _LastChanged);
cm.Parameters.AddWithValue("@RODbID", RODbID);
// Output Calculated Columns
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
param_LastChanged.Direction = ParameterDirection.Output;
cm.Parameters.Add(param_LastChanged);
// CSLATODO: Define any additional output parameters
cm.ExecuteNonQuery();
// Save all values being returned from the Procedure
_LastChanged = (byte[])cm.Parameters["@newLastChanged"].Value;
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateRoUsage";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@ROUsageID", _ROUsageID);
cm.Parameters.AddWithValue("@ContentID", ContentID);
cm.Parameters.AddWithValue("@ROID", _ROID);
cm.Parameters.AddWithValue("@Config", _Config);
if (_DTS.Year >= 1753 && _DTS.Year <= 9999) cm.Parameters.AddWithValue("@DTS", _DTS);
cm.Parameters.AddWithValue("@UserID", _UserID);
cm.Parameters.AddWithValue("@LastChanged", _LastChanged);
cm.Parameters.AddWithValue("@RODbID", RODbID);
// Output Calculated Columns
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp)
{
Direction = ParameterDirection.Output
};
cm.Parameters.Add(param_LastChanged);
// CSLATODO: Define any additional output parameters
cm.ExecuteNonQuery();
// Save all values being returned from the Procedure
_LastChanged = (byte[])cm.Parameters["@newLastChanged"].Value;
}
}
}
MarkOld();
// use the open connection to update child objects
}
@@ -882,14 +795,17 @@ namespace VEPROMS.CSLA.Library
}
internal void Update()
{
if (!this.IsDirty) return;
if (!IsDirty) return;
if (base.IsDirty)
{
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
if (IsNew)
_LastChanged = RoUsage.Add(cn, ref _ROUsageID, _MyContent, _ROID, _Config, _DTS, _UserID, _MyRODb);
else
_LastChanged = RoUsage.Update(cn, ref _ROUsageID, _ContentID, _ROID, _Config, _DTS, _UserID, ref _LastChanged, _RODbID);
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
{
if (IsNew)
_LastChanged = RoUsage.Add(cn, ref _ROUsageID, _MyContent, _ROID, _Config, _DTS, _UserID, _MyRODb);
else
_LastChanged = RoUsage.Update(cn, ref _ROUsageID, _ContentID, _ROID, _Config, _DTS, _UserID, ref _LastChanged, _RODbID);
}
MarkOld();
}
}
@@ -914,8 +830,10 @@ namespace VEPROMS.CSLA.Library
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
cm.Parameters.AddWithValue("@RODbID", rODbID);
// Output Calculated Columns
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
param_LastChanged.Direction = ParameterDirection.Output;
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp)
{
Direction = ParameterDirection.Output
};
cm.Parameters.Add(param_LastChanged);
// CSLATODO: Define any additional output parameters
cm.ExecuteNonQuery();
@@ -1000,16 +918,10 @@ namespace VEPROMS.CSLA.Library
[Serializable()]
private class ExistsCommand : CommandBase
{
private int _ROUsageID;
private readonly int _ROUsageID;
private bool _exists;
public bool Exists
{
get { return _exists; }
}
public ExistsCommand(int rOUsageID)
{
_ROUsageID = rOUsageID;
}
public bool Exists => _exists;
public ExistsCommand(int rOUsageID) => _ROUsageID = rOUsageID;
protected override void DataPortal_Execute()
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] RoUsage.DataPortal_Execute", GetHashCode());
@@ -1025,7 +937,7 @@ namespace VEPROMS.CSLA.Library
cm.CommandText = "existsRoUsage";
cm.Parameters.AddWithValue("@ROUsageID", _ROUsageID);
int count = (int)cm.ExecuteScalar();
_exists = (count > 0);
_exists = count > 0;
}
}
}
@@ -1039,7 +951,7 @@ namespace VEPROMS.CSLA.Library
#endregion
// Standard Default Code
#region extension
RoUsageExtension _RoUsageExtension = new RoUsageExtension();
readonly RoUsageExtension _RoUsageExtension = new RoUsageExtension();
[Serializable()]
partial class RoUsageExtension : extensionBase
{
@@ -1048,18 +960,9 @@ namespace VEPROMS.CSLA.Library
class extensionBase
{
// Default Values
public virtual int DefaultContentID
{
get { return 0; }
}
public virtual DateTime DefaultDTS
{
get { return DateTime.Now; }
}
public virtual string DefaultUserID
{
get { return Volian.Base.Library.VlnSettings.UserID; }
}
public virtual int DefaultContentID => 0;
public virtual DateTime DefaultDTS => DateTime.Now;
public virtual string DefaultUserID => Volian.Base.Library.VlnSettings.UserID;
// Authorization Rules
public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules)
{
@@ -1088,61 +991,13 @@ namespace VEPROMS.CSLA.Library
{
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{
if (destType == typeof(string) && value is RoUsage)
if (destType == typeof(string) && value is RoUsage usage)
{
// Return the ToString value
return ((RoUsage)value).ToString();
return usage.ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace
//// The following is a sample Extension File. You can use it to create RoUsageExt.cs
//using System;
//using System.Collections.Generic;
//using System.Text;
//using Csla;
//namespace VEPROMS.CSLA.Library
//{
// public partial class RoUsage
// {
// partial class RoUsageExtension : extensionBase
// {
// // CSLATODO: Override automatic defaults
// public virtual int DefaultContentID
// {
// get { return 0; }
// }
// public virtual DateTime DefaultDTS
// {
// get { return DateTime.Now; }
// }
// public virtual string DefaultUserID
// {
// get { return Environment.UserName.ToUpper(); }
// }
// public new void AddAuthorizationRules(Csla.Security.AuthorizationRules rules)
// {
// //rules.AllowRead(Dbid, "<Role(s)>");
// }
// public new void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules)
// {
// //rules.AllowInstanceRead(Dbid, "<Role(s)>");
// }
// public new void AddValidationRules(Csla.Validation.ValidationRules rules)
// {
// rules.AddRule(
// Csla.Validation.CommonRules.StringMaxLength,
// new Csla.Validation.CommonRules.MaxLengthRuleArgs("Name", 100));
// }
// public new void AddInstanceValidationRules(Csla.Validation.ValidationRules rules)
// {
// rules.AddInstanceRule(/* Instance Validation Rule */);
// }
// }
// }
//}
} // Namespace