Exemple #1
0
 public TonalityMarkingOutputResult
 (
     string resultXml,
     bool resultXmlIsEmpty,
     InquiryAllocateStatus inquiryAllocateStatus,
     double?positive,
     double?negative,
     List <TonalityMarkingObject> objects,
     IEnumerable <string> operateRulesNames = null
 )
     : base(operateRulesNames)
 {
     OutputXml                  = resultXml;
     OutputXmlIsEmpty           = resultXmlIsEmpty;
     InquiryAllocateStatus      = inquiryAllocateStatus;
     AuthorTonalityMarkingTuple = TonalityMarkingTuple.CreateSubjectAuthor(positive, negative, objects);
     TonalityMarkingTuples      = (new[] { AuthorTonalityMarkingTuple }).ToList().AsReadOnly();
 }
Exemple #2
0
        public TonalityMarkingOutputResult
        (
            XDocument resultXDocument,
            InquiryAllocateStatus inquiryAllocateStatus,
            double?positive,
            double?negative,
            List <TonalityMarkingObject> objects,
            IEnumerable <string> operateRulesNames = null
        )
            : base(operateRulesNames)
        {
            resultXDocument.ThrowIfNull("resultXDocument");
            //if ( !resultXDocument.Root.HasElements ) throw (new ArgumentNullException("Tonality output-xml is empty."));

            _OutputXDocument           = resultXDocument;
            OutputXml                  = resultXDocument.ToString();
            OutputXmlIsEmpty           = !resultXDocument.Root.HasElements;
            InquiryAllocateStatus      = inquiryAllocateStatus;
            AuthorTonalityMarkingTuple = TonalityMarkingTuple.CreateSubjectAuthor(positive, negative, objects);
            TonalityMarkingTuples      = (new[] { AuthorTonalityMarkingTuple }).ToList().AsReadOnly();
        }