Пример #1
0
        public OperationStatus(OperationStatusFlag flag, string reason)
        {
            Contract.ThrowIfTrue(flag.Succeeded() && flag.HasBestEffort());

            Flag    = flag;
            Reasons = reason == null?SpecializedCollections.EmptyEnumerable <string>() : SpecializedCollections.SingletonEnumerable(reason);
        }
Пример #2
0
        private OperationStatus(OperationStatusFlag flag, IEnumerable <string> reasons)
        {
            Contract.ThrowIfNull(reasons);
            Contract.ThrowIfTrue(flag.Succeeded() && flag.HasBestEffort());

            Flag    = flag;
            Reasons = reasons;
        }