/// <summary> /// Constructor to create a new recycle bin based on RecycleBinType /// Will automatically update internal nodeObjectType based on the RecycleBinType enum /// </summary> /// <param name="type"></param> public RecycleBin(RecycleBinType type) : base((int)type) { switch (type) { case RecycleBinType.Content: _nodeObjectType = Document._objectType; m_BinType = RecycleBinType.Content; break; case RecycleBinType.Media: _nodeObjectType = Media._objectType; m_BinType = RecycleBinType.Media; break; } }
public static int Count(RecycleBinType type) { Guid objectType = Document._objectType; switch (type) { case RecycleBinType.Content: objectType = Document._objectType; break; case RecycleBinType.Media: objectType = Media._objectType; break; } string sql = String.Format(RecycleBin.m_ChildCountSQL, (int)type); return(SqlHelper.ExecuteScalar <int>(sql, SqlHelper.CreateParameter("@nodeObjectType", objectType))); }
public RecycleBin(Guid nodeObjectType, RecycleBinType type) : base((int)type) { _nodeObjectType = nodeObjectType; m_BinType = type; }
public static int Count(RecycleBinType type) { Guid objectType = Document._objectType; switch (type) { case RecycleBinType.Content: objectType = Document._objectType; break; case RecycleBinType.Media: objectType = Media._objectType; break; } string sql = String.Format(RecycleBin.m_ChildCountSQL, (int) type); return SqlHelper.ExecuteScalar<int>( sql, SqlHelper.CreateParameter("@nodeObjectType", objectType)); }