public static void Reset() { var currentBuildNumber = BuildNumber.Get(); var result = EditorUtility.DisplayDialog("Reset Build Number?", $"Are you sure you want to reset build number?\n\nCurrent build number: {currentBuildNumber}", "Reset", "Cancel"); if (result) { BuildNumberProcessor.Reset(); } }
// If your activity returns a value, derive from CodeActivity<TResult> // and return the value from the Execute method. protected override void Execute(CodeActivityContext context) { string buildNumber = BuildNumber.Get(context); string smartFrameworkVersion = context.GetValue <string>(SmartFrameworkVersion); if (String.IsNullOrWhiteSpace(smartFrameworkVersion)) { throw new ArgumentNullException("SmartFrameworkVersion", "In UpdateReferences.Execute, SmartFrameworkVersion is null or whitespace."); } Tuple <bool, string> versionValidation = Util.ValidateFrameworkVersion(smartFrameworkVersion); if (versionValidation.Item1) { List <string> solutionFiles = SolutionFiles.Get(context); Workspace workspace = Workspace.Get(context); ReferenceUpdateManager.UpdateReferences(solutionFiles, versionValidation.Item2, workspace); } else { string message = String.Format("{0} is not a valid Smart Framework version.", smartFrameworkVersion); throw new ArgumentException(message); } }
private static int ReadBuildNumberFromFile() { return(BuildNumber.Get()); }