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
/// <summary> | |
/// Borrowed From Umbraco Source. Matches a culture iso name suffix | |
/// </summary> | |
/// <remarks> | |
/// myFieldName_en-us will match the "en-us" | |
/// </remarks> | |
public static readonly Regex CultureIsoCodeFieldNameMatchExpression = new Regex("^([_\\w]+)_([a-z]{2}-[a-z0-9]{2,4})$", RegexOptions.Compiled); |
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
// These tests show the various ways to spawn child threads | |
// and in what scenarios the value in the AsyncLocal or | |
// logical CallContext will flow to the child threads. | |
// All of the below test results are identical if you | |
// use the old CallContext.LogicalSetData CallContext.LogicalGetData | |
void Main() | |
{ | |
// Set the AsyncLocal value and we'll see where this flows |
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
/// <summary> | |
/// Custom service to work with products | |
/// </summary> | |
public interface IProductService | |
{ | |
IEnumerable<Product> GetAll(); | |
} |
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
-- NOTES: | |
-- The COMMIT TRANSACTION is commented out at the bottom. | |
-- Running this script as-is will produce a report of problems if any are found. | |
-- If no problems are found, nothing is reported. | |
-- To commit the changes, uncomment the COMMIT TRANSACTION and comment out ROLLBACK TRANSACTION. | |
-- Once committed, re-run the script and no errors should be detected. | |
-- This is a SQL port of the c# code: https://github.com/umbraco/Umbraco-CMS/pull/7907/files#diff-83e79f7101cd6797ca42ad8ed07f5835R480 | |
-- By default is this execute for MEDIA but you should execute it for CONTENT too, to do that | |
-- see the SQL statement below that does this WHERE nodeObjectType = @mediaObjectType and change it | |
-- to WHERE nodeObjectType = @contentObjectType |
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 class PackageBinaryInspector : MarshalByRefObject | |
{ | |
/// <summary> | |
/// Entry point to call from your code | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="dllPath"></param> | |
/// <param name="errorReport"></param> | |
/// <returns></returns> | |
/// <remarks> |
OlderNewer