This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class SafeExtensions | |
{ | |
public static IEnumerable<T> SafeToList<T>(this IEnumerable<T> source) | |
{ | |
return source != null ? source.ToList() : null; | |
} | |
public static T[] SafeToArray<T>(this IEnumerable<T> source) | |
{ | |
return source != null ? source.ToArray() : null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
icacls app_code /grant "IIS APPPOOL\umbraco":(OI)(CI)RX | |
icacls app_browsers /grant "IIS APPPOOL\umbraco":(OI)(CI)RX | |
icacls app_data /grant "IIS APPPOOL\umbraco":(OI)(CI)M | |
icacls bin /grant "IIS APPPOOL\umbraco":(OI)(CI)M | |
icacls config /grant "IIS APPPOOL\umbraco":(OI)(CI)M | |
icacls css /grant "IIS APPPOOL\umbraco":(OI)(CI)M | |
icacls data /grant "IIS APPPOOL\umbraco":(OI)(CI)M | |
icacls macroscripts /grant "IIS APPPOOL\umbraco":(OI)(CI)M | |
icacls masterpages /grant "IIS APPPOOL\umbraco":(OI)(CI)M | |
icacls media /grant "IIS APPPOOL\umbraco":(OI)(CI)M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string GetBuildNumber() | |
{ | |
return Assembly.GetExecutingAssembly().GetName().Version.ToString(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class EnumHelper<T> | |
{ | |
public static string GetEnumDescription(T _enum) | |
{ | |
Type type = _enum.GetType(); | |
var memInfo = type.GetMember(_enum.ToString()); | |
if (memInfo.Length > 0) | |
{ |
NewerOlder