How can I make method invocation order explicit with C#?
I want to make it explicit in code that one method should be called before the other, somewhat similar to the way callbacks work in JavaScript. I'm thinking that something like an array or List of Action might do the trick, but am not sure if this the best way, given what I am trying to achieve - it winds up being a better experience for the user if things happen in a certain order, but I want to make this explicit through code, instead of adding a comment.
Here's what I have so far:
Action<dynamic>[] deleteOperations = new Action<dynamic>[2];
deleteOperations[0] = (resource => this.RemoveImageFromDatabase(resource));
deleteOperations[1] = (filename => _blobStorage.DeleteBlob(filename));