コード例 #1
0
ファイル: Difference.cs プロジェクト: m3zercat/slntools
 protected Difference(
             ElementIdentifier identifier,
             OperationOnParent operationOnParent)
 {
     if (identifier == null)
         throw new ArgumentNullException("identifier");
     if (! Enum.IsDefined(operationOnParent.GetType(), operationOnParent))
         throw new ArgumentOutOfRangeException("operationOnParent", operationOnParent, "Invalid value");
     r_identifier = identifier;
     r_operationOnParent = operationOnParent;
 }
コード例 #2
0
 protected Difference(
     ElementIdentifier identifier,
     OperationOnParent operationOnParent)
 {
     if (identifier == null)
     {
         throw new ArgumentNullException("identifier");
     }
     if (!Enum.IsDefined(operationOnParent.GetType(), operationOnParent))
     {
         throw new ArgumentOutOfRangeException("operationOnParent", operationOnParent, "Invalid value");
     }
     r_identifier        = identifier;
     r_operationOnParent = operationOnParent;
 }
コード例 #3
0
        public ValueConflict(
                    ElementIdentifier identifier,
                    OperationOnParent operationOnParent,
                    string commonAncestrorValue,
                    string newValueInSourceBranch,
                    string newValueInDestinationBranch)
            : base(identifier)
        {
            if (!Enum.IsDefined(operationOnParent.GetType(), operationOnParent))
                throw new ArgumentOutOfRangeException("operationOnParent", operationOnParent.ToString(), "Invalid value");

            r_operationOnParent = operationOnParent;
            r_oldValue = commonAncestrorValue;
            r_newValueInSourceBranch = newValueInSourceBranch;
            r_newValueInDestinationBranch = newValueInDestinationBranch;
        }
コード例 #4
0
        public NodeConflict(
                    ElementIdentifier identifier,
                    OperationOnParent operationOnParent,
                    IEnumerable<Difference> acceptedSubdifferences,
                    IEnumerable<Conflict> subconflicts)
            : base(identifier)
        {
            if (!Enum.IsDefined(operationOnParent.GetType(), operationOnParent))
                throw new ArgumentOutOfRangeException("operationOnParent", operationOnParent, "Invalid value");
            if (acceptedSubdifferences == null)
                throw new ArgumentNullException("acceptedSubdifferences");
            if (subconflicts == null)
                throw new ArgumentNullException("subconflicts");

            r_operationOnParent = operationOnParent;
            r_acceptedSubdifferences = new DifferenceHashList(acceptedSubdifferences);
            r_subconflicts = new List<Conflict>(subconflicts);
        }
コード例 #5
0
        public ValueConflict(
            ElementIdentifier identifier,
            OperationOnParent operationOnParent,
            string commonAncestrorValue,
            string newValueInSourceBranch,
            string newValueInDestinationBranch)
            : base(identifier)
        {
            if (!Enum.IsDefined(operationOnParent.GetType(), operationOnParent))
            {
                throw new ArgumentOutOfRangeException("operationOnParent", operationOnParent.ToString(), "Invalid value");
            }

            r_operationOnParent           = operationOnParent;
            r_oldValue                    = commonAncestrorValue;
            r_newValueInSourceBranch      = newValueInSourceBranch;
            r_newValueInDestinationBranch = newValueInDestinationBranch;
        }
コード例 #6
0
        public NodeConflict(
            ElementIdentifier identifier,
            OperationOnParent operationOnParent,
            IEnumerable <Difference> acceptedSubdifferences,
            IEnumerable <Conflict> subconflicts)
            : base(identifier)
        {
            if (!Enum.IsDefined(operationOnParent.GetType(), operationOnParent))
            {
                throw new ArgumentOutOfRangeException("operationOnParent", operationOnParent, "Invalid value");
            }
            if (acceptedSubdifferences == null)
            {
                throw new ArgumentNullException("acceptedSubdifferences");
            }
            if (subconflicts == null)
            {
                throw new ArgumentNullException("subconflicts");
            }

            r_operationOnParent      = operationOnParent;
            r_acceptedSubdifferences = new DifferenceHashList(acceptedSubdifferences);
            r_subconflicts           = new List <Conflict>(subconflicts);
        }