public ExtractMethodResult( OperationStatusFlag status, IEnumerable<string> reasons, Document document, SyntaxToken invocationNameToken, SyntaxNode methodDeclarationNode) { this.Status = status; this.Succeeded = status.Succeeded() && !status.HasSuggestion(); this.SucceededWithSuggestion = status.Succeeded() && status.HasSuggestion(); this.Reasons = (reasons ?? SpecializedCollections.EmptyEnumerable<string>()).ToReadOnlyCollection(); this.Document = document; this.InvocationNameToken = invocationNameToken; this.MethodDeclarationNode = methodDeclarationNode; }
public static bool Succeeded(this OperationStatusFlag flag) => (flag & OperationStatusFlag.Succeeded) != 0;