public static IDictionary <string, string> GetAllVariables(ITaskContext context, bool isSafe = false) { IVariableService ivariableService = (IVariableService)((IServiceManager)context).GetService <IVariableService>(); IDictionary <string, string> dictionary = new Dictionary <string, string>(); if (ivariableService != null) { if (!isSafe) { ivariableService.MergeVariables(dictionary); } else { ivariableService.MergeSafeVariables(dictionary); } } return(dictionary); }