public OperationStatus(OperationStatusFlag flag, string reason) { Contract.ThrowIfTrue(flag.Succeeded() && flag.HasBestEffort()); Flag = flag; Reasons = reason == null?SpecializedCollections.EmptyEnumerable <string>() : SpecializedCollections.SingletonEnumerable(reason); }
private OperationStatus(OperationStatusFlag flag, IEnumerable <string> reasons) { Contract.ThrowIfNull(reasons); Contract.ThrowIfTrue(flag.Succeeded() && flag.HasBestEffort()); Flag = flag; Reasons = reasons; }