示例#1
0
        /// <summary>
        /// Object Hash code
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = CVList != null?CVList.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (AnalysisSoftwareList != null ? AnalysisSoftwareList.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Provider != null ? Provider.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (AuditCollection != null ? AuditCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^
                           (AnalysisSampleCollection != null ? AnalysisSampleCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (SequenceCollection != null ? SequenceCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (AnalysisCollection != null ? AnalysisCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^
                           (AnalysisProtocolCollection != null ? AnalysisProtocolCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (DataCollection != null ? DataCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^
                           (BibliographicReferences != null ? BibliographicReferences.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ CreationDate.GetHashCode();
                hashCode = (hashCode * 397) ^ (Version != null ? Version.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Id != null ? Id.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
                return(hashCode);
            }
        }
示例#2
0
 /// <summary>
 ///     Find the <see cref="OrganizationObj" /> that matches id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 protected internal OrganizationObj FindOrganization(string id)
 {
     if (string.IsNullOrWhiteSpace(id))
     {
         return(null);
     }
     try
     {
         var result = AuditCollection.Where(item => item.Id == id).ToList();
         if (result.Count > 0)
         {
             foreach (var item in result)
             {
                 var o = item as OrganizationObj;
                 if (o != null)
                 {
                     return(o);
                 }
             }
         }
     }
     catch
     {
         // Ignore errors; must resolve reference later...
     }
     return(null);
 }
示例#3
0
 //Dispose method
 public void Dispose()
 {
     if (GlassCollection != null)
     {
         GlassCollection.Clear();
     }
     if (BfeedCollection != null)
     {
         BfeedCollection.Clear();
     }
     if (AuditCollection != null)
     {
         AuditCollection.Clear();
     }
     if (WineCollection != null)
     {
         WineCollection.Clear();
     }
     if (BreastCancerCollection != null)
     {
         BreastCancerCollection.Clear();
     }
     if (IrisCollection != null)
     {
         IrisCollection.Clear();
     }
     if (TitanicCollection != null)
     {
         TitanicCollection.Clear();
     }
     if (RecommendedGroceries != null)
     {
         RecommendedGroceries.Clear();
     }
     if (ClusterInformation != null)
     {
         ClusterInformation.Clear();
     }
     if (PMML != null)
     {
         PMML = null;
     }
     if (RCode != null)
     {
         RCode = null;
     }
     if (CSharpCode != null)
     {
         CSharpCode = null;
     }
 }
示例#4
0
 /// <summary>
 ///     Cascade the identData reference throughout the entire set of objects.
 /// </summary>
 internal void CascadeProperties()
 {
     if (Provider != null)
     {
         Provider.CascadeProperties();
     }
     if (SequenceCollection != null)
     {
         SequenceCollection.CascadeProperties();
     }
     if (AnalysisCollection != null)
     {
         AnalysisCollection.CascadeProperties();
     }
     if (AnalysisProtocolCollection != null)
     {
         AnalysisProtocolCollection.CascadeProperties();
     }
     if (DataCollection != null)
     {
         DataCollection.CascadeProperties();
     }
     if (CVList != null)
     {
         CVList.CascadeProperties();
     }
     if (AnalysisSoftwareList != null)
     {
         AnalysisSoftwareList.CascadeProperties();
     }
     if (AuditCollection != null)
     {
         AuditCollection.CascadeProperties();
     }
     if (AnalysisSampleCollection != null)
     {
         AnalysisSampleCollection.CascadeProperties();
     }
     if (BibliographicReferences != null)
     {
         BibliographicReferences.CascadeProperties();
     }
 }
示例#5
0
 /// <summary>
 ///     Find the <see cref="AbstractContactObj" /> that matches id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 protected internal AbstractContactObj FindContact(string id)
 {
     if (string.IsNullOrWhiteSpace(id))
     {
         return(null);
     }
     try
     {
         var result = AuditCollection.Where(item => item.Id == id).ToList();
         if (result.Count > 0)
         {
             return(result.First());
         }
     }
     catch
     {
         // Ignore errors; must resolve reference later...
     }
     return(null);
 }
 public AuditCollection GetAuditMessageCollection()
 {
     AuditCollection result = new AuditCollection();
     foreach(Audit audit in this)
     {
         if(audit.GetType() == typeof(CellBlockWarningAudit) ||
             audit.GetType() == typeof(AncillaryStudiesAreHandledAudit) ||
             audit.GetType() == typeof(SurgicalCaseHasQuestionMarksAudit) ||
             audit.GetType() == typeof(SigningUserIsAssignedUserAudit) ||
             audit.GetType() == typeof(SvhCaseHasMRNAndAccountNoAudit) ||
             audit.GetType() == typeof(CaseHasNotFoundClientAudit) ||
             audit.GetType() == typeof(CaseHasNotFoundProviderAudit) ||
             audit.GetType() == typeof(DistributionCanBeSetAudit) ||
             audit.GetType() == typeof(CaseHasUnfinaledPeerReviewAudit) ||
             audit.GetType() == typeof(GradedStainsAreHandledAudit) ||
             audit.GetType() == typeof(IntraoperativeConsultationCorrelationAudit))
         {
             result.Add(audit);
         }
     }
     return result;
 }
 public AuditCollection GetSuggestedTestAuditCollection()
 {
     AuditCollection result = new AuditCollection();
     foreach (Audit audit in this)
     {
         if (audit.GetType() == typeof(LynchSyndromeAudit) ||
             audit.GetType() == typeof(CCCPAudit) ||
             audit.GetType() == typeof(BRAFMetastaticMelanomaAudit) ||
             audit.GetType() == typeof(HPV1618ForSiteAudit) ||
             audit.GetType() == typeof(RASRAForMetastaticColorectalCancerAudit) ||
             audit.GetType() == typeof(PNHOnBoneMarrowSpecimenAudit) ||
             audit.GetType() == typeof(PDL1Audit))
         {
             result.Add(audit);
         }
     }
     return result;
 }
示例#8
0
 /// <summary>Initializes a new instance of the AuditOutputBase class.</summary>
 /// <param name="audits">The audits objects that will be used for the output.</param>
 public OutputUnitTest(AuditCollection audits) : base(audits)
 {
 }
示例#9
0
 /// <summary>Initializes a new instance of the AuditOutputBase class.</summary>
 /// <param name="audits">The audits objects that will be used for the output.</param>
 protected AuditOutputBase(AuditCollection audits)
 {
     _audits = audits;
 }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the AuditOutputBase class.
 /// </summary>
 /// <param name="audits">The audits objects that will be used for the output.</param>
 public OutputAudit(AuditCollection audits) : base(audits)
 {
 }