Show / Hide Table of Contents

Class Util

Inheritance
object
Util
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Dnn.ExportImport.Components.Common
Assembly: DotNetNuke.SiteExportImport.dll
Syntax
public static class Util

Methods

CalculateTotalPages(int, int)

Declaration
public static int CalculateTotalPages(int totalRecords, int pageSize)
Parameters
Type Name Description
int totalRecords
int pageSize
Returns
Type Description
int

ConvertToDbLocalTime(DateTime?)

Declaration
public static DateTime? ConvertToDbLocalTime(DateTime? dateTime)
Parameters
Type Name Description
DateTime? dateTime
Returns
Type Description
DateTime?

ConvertToDbUtcTime(DateTime?)

Declaration
public static DateTime? ConvertToDbUtcTime(DateTime? dateTime)
Parameters
Type Name Description
DateTime? dateTime
Returns
Type Description
DateTime?

FixDateTime<T>(T)

Declaration
public static void FixDateTime<T>(T item)
Parameters
Type Name Description
T item
Type Parameters
Name Description
T

FormatNumber(int?)

Declaration
public static string FormatNumber(int? number)
Parameters
Type Name Description
int? number
Returns
Type Description
string

FormatSize(long, byte)

Declaration
public static string FormatSize(long bytes, byte decimals = 1)
Parameters
Type Name Description
long bytes
byte decimals
Returns
Type Description
string

GeModuleDefIdByFriendltName(string)

Declaration
public static int? GeModuleDefIdByFriendltName(string friendlyName)
Parameters
Type Name Description
string friendlyName
Returns
Type Description
int?

GePermissionIdByName(string, string, string)

Declaration
public static int? GePermissionIdByName(string permissionCode, string permissionKey, string permissionName)
Parameters
Type Name Description
string permissionCode
string permissionKey
string permissionName
Returns
Type Description
int?

GetDateTimeString(DateTime?)

Declaration
public static string GetDateTimeString(DateTime? dateTime)
Parameters
Type Name Description
DateTime? dateTime
Returns
Type Description
string

GetExpImpJobCacheKey(ExportImportJob)

Declaration
public static string GetExpImpJobCacheKey(ExportImportJob job)
Parameters
Type Name Description
ExportImportJob job
Returns
Type Description
string

GetPortableImplementors()

Declaration
[Obsolete("Deprecated in DotNetNuke 10.0.0. Please use overload with IServiceProvider. Scheduled for removal in v12.0.0.")]
public static IEnumerable<BasePortableService> GetPortableImplementors()
Returns
Type Description
IEnumerable<BasePortableService>

GetPortableImplementors(IServiceProvider)

Declaration
public static IEnumerable<BasePortableService> GetPortableImplementors(IServiceProvider serviceProvider)
Parameters
Type Name Description
IServiceProvider serviceProvider
Returns
Type Description
IEnumerable<BasePortableService>

GetProfilePropertyId(int, int?, string)

Declaration
public static int? GetProfilePropertyId(int portalId, int? exportedProfilePropertyId, string exportProfilePropertyname)
Parameters
Type Name Description
int portalId
int? exportedProfilePropertyId
string exportProfilePropertyname
Returns
Type Description
int?

GetRoleIdByName(int, int, string)

Declaration
public static int? GetRoleIdByName(int portalId, int exportRoleId, string exportRolename)
Parameters
Type Name Description
int portalId
int exportRoleId
string exportRolename
Returns
Type Description
int?

GetUserIdByName(ExportImportJob, int?, string)

Declaration
public static int GetUserIdByName(ExportImportJob importJob, int? exportedUserId, string exportUsername)
Parameters
Type Name Description
ExportImportJob importJob
int? exportedUserId
string exportUsername
Returns
Type Description
int

HasValue(string)

Declaration
[Obsolete("Deprecated in DotNetNuke 9.8.0. Use !string.IsNullOrEmpty from System.String instead. Scheduled for removal in v11.0.0.")]
public static bool HasValue(this string s)
Parameters
Type Name Description
string s
Returns
Type Description
bool

IsNullOrEmpty(string)

Declaration
[Obsolete("Deprecated in DotNetNuke 9.8.0. Use string.IsNullOrEmpty from System.String instead. Scheduled for removal in v11.0.0.")]
public static bool IsNullOrEmpty(this string s)
Parameters
Type Name Description
string s
Returns
Type Description
bool

IsNullOrWhiteSpace(string)

Declaration
[Obsolete("Deprecated in DotNetNuke 9.8.0. Use string.IsNullOrWhiteSpace from System.String instead. Scheduled for removal in v11.0.0.")]
public static bool IsNullOrWhiteSpace(this string s)
Parameters
Type Name Description
string s
Returns
Type Description
bool

ReadJson<T>(string, ref T)

Declaration
public static void ReadJson<T>(string filePath, ref T item)
Parameters
Type Name Description
string filePath
T item
Type Parameters
Name Description
T

ToLocalDateTime(DateTime, UserInfo)

Declaration
public static DateTime ToLocalDateTime(DateTime dateTime, UserInfo userInfo)
Parameters
Type Name Description
DateTime dateTime
UserInfo userInfo
Returns
Type Description
DateTime

ToLocalDateTime(DateTime?, UserInfo)

Declaration
public static DateTime? ToLocalDateTime(DateTime? dateTime, UserInfo userInfo)
Parameters
Type Name Description
DateTime? dateTime
UserInfo userInfo
Returns
Type Description
DateTime?

WriteJson<T>(string, T)

Declaration
public static void WriteJson<T>(string filePath, T item)
Parameters
Type Name Description
string filePath
T item
Type Parameters
Name Description
T
Back to top by the community, for the community... #DNNCMS