コード例 #1
0
 partial void OnUpdatedByChanged()
 {
     if (!string.IsNullOrEmpty(_UpdatedBy))
     {
         _UpdatedBy = UpdatedBy.TextEncode();
     }
 }
コード例 #2
0
        /// <summary>
        ///     Searches the dictionary for an update to this.
        /// </summary>
        /// <param name="dictionary"></param>
        /// <returns></returns>
        public Specification FindOrCreateSpecificationUpdate(Dictionary dictionary)
        {
            Specification retVal = null;

            foreach (ModelElement update in UpdatedBy)
            {
                if (update.Dictionary == dictionary)
                {
                    Specification specUpdate = update as Specification;
                    if (specUpdate != null)
                    {
                        retVal = specUpdate;
                    }
                    break;
                }
            }

            if (retVal == null)
            {
                retVal = CreateSpecificationUpdate(dictionary);
                UpdatedBy.Add(retVal);
            }

            return(retVal);
        }
コード例 #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (Reason.Length != 0)
            {
                hash ^= Reason.GetHashCode();
            }
            if (dateRange_ != null)
            {
                hash ^= DateRange.GetHashCode();
            }
            if (enteredBy_ != null)
            {
                hash ^= EnteredBy.GetHashCode();
            }
            if (updatedBy_ != null)
            {
                hash ^= UpdatedBy.GetHashCode();
            }
            if (updatedAt_ != null)
            {
                hash ^= UpdatedAt.GetHashCode();
            }
            if (room_ != null)
            {
                hash ^= Room.GetHashCode();
            }
            return(hash);
        }
コード例 #4
0
        /// <summary>
        ///     Creates an update of this chapter in the provided specification
        /// </summary>
        /// <param name="specification">The specification update</param>
        /// <returns></returns>
        public Chapter CreateChapterUpdate(Specification specification)
        {
            Chapter retVal = new Chapter();

            retVal.Id = Id;
            retVal.setUpdates(Guid);

            specification.appendChapters(retVal);
            ArrayList tmp = new ArrayList();

            foreach (Chapter chapter in EnclosingSpecification.Chapters)
            {
                if (chapter.UpdatedBy != null)
                {
                    tmp.Add(chapter.UpdatedBy);
                }
                if (chapter == this)
                {
                    tmp.Add(retVal);
                }
            }

            UpdatedBy.Add(retVal);

            return(retVal);
        }
コード例 #5
0
 public void MergeFrom(OutOfOrderRecord other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.Operations.OutOfOrder.OutOfOrderRecordIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.Reason.Length != 0)
     {
         Reason = other.Reason;
     }
     if (other.dateRange_ != null)
     {
         if (dateRange_ == null)
         {
             dateRange_ = new global::HOLMS.Types.Primitive.PbInclusiveOpsdateRange();
         }
         DateRange.MergeFrom(other.DateRange);
     }
     if (other.enteredBy_ != null)
     {
         if (enteredBy_ == null)
         {
             enteredBy_ = new global::HOLMS.Types.IAM.StaffMember();
         }
         EnteredBy.MergeFrom(other.EnteredBy);
     }
     if (other.updatedBy_ != null)
     {
         if (updatedBy_ == null)
         {
             updatedBy_ = new global::HOLMS.Types.IAM.StaffMember();
         }
         UpdatedBy.MergeFrom(other.UpdatedBy);
     }
     if (other.updatedAt_ != null)
     {
         if (updatedAt_ == null)
         {
             updatedAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         UpdatedAt.MergeFrom(other.UpdatedAt);
     }
     if (other.room_ != null)
     {
         if (room_ == null)
         {
             room_ = new global::HOLMS.Types.Operations.Rooms.Room();
         }
         Room.MergeFrom(other.Room);
     }
 }
コード例 #6
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (DisplayName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName");
     }
     if (Query == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Query");
     }
     if (CreatedBy != null)
     {
         CreatedBy.Validate();
     }
     if (UpdatedBy != null)
     {
         UpdatedBy.Validate();
     }
 }
コード例 #7
0
        /// <summary>
        ///     Creates an update for this paragraph in the provided dictionary.
        /// </summary>
        /// <param name="dictionary">The dictionary to put the updated paragraph in</param>
        /// <returns>The updated paragraph</returns>
        public Paragraph CreateParagraphUpdate(Dictionary dictionary)
        {
            Paragraph retVal = (Paragraph)acceptor.getFactory().createParagraph();

            retVal.FullId = FullId;
            retVal.Text   = Text;
            retVal.setUpdates(Guid);

            Specification specUpdate = FindEnclosingSpecification().FindOrCreateSpecificationUpdate(dictionary);

            // If the enclosing is a paragraph, find or create the enclosing paragraph update
            // If it is a chapter, find or create the chapter update
            if (EnclosingParagraph != null)
            {
                string    parentId = FullId.Substring(0, FullId.LastIndexOf('.'));
                Paragraph parent   = specUpdate.FindParagraphByNumber(parentId);
                if (parent == null)
                {
                    parent = EnclosingParagraph.CreateParagraphUpdate(dictionary);
                }
                parent.appendParagraphs(retVal);
                parent.SubParagraphs.Sort();
            }
            else if (EnclosingChapter != null)
            {
                Chapter parent = EnclosingChapter.FindChapterUpdate(dictionary);
                if (parent == null)
                {
                    parent = EnclosingChapter.CreateChapterUpdate(specUpdate);
                }
                parent.appendParagraphs(retVal);
                parent.Paragraphs.Sort();
            }

            UpdatedBy.Add(retVal);

            return(retVal);
        }
コード例 #8
0
 public override string ToString()
 {
     return("UserId = " + UserId.ToString() + ",Name = " + Name + ",Password = "******",FirstName = " + FirstName + ",LastName = " + LastName + ",Email = " + Email + ",IsLoggedIn = " + IsLoggedIn.ToString() + ",HasAdminRight = " + HasAdminRight.ToString() + ",HasRefundright = " + HasRefundright.ToString() + ",HasDiscountRight = " + HasDiscountRight.ToString() + ",EnteredBy = " + EnteredBy.ToString() + ",EnteredTime = " + EnteredTime.ToString() + ",UpdatedBy = " + UpdatedBy.ToString() + ",UpdatedTime = " + UpdatedTime.ToString() + ",DeactivatedTime = " + DeactivatedTime.ToString());
 }
コード例 #9
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as CatalogEntry;

            if (dest == null)
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }

            base.CopyTo(dest);
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (TypeElement != null)
            {
                dest.TypeElement = (Code <Hl7.Fhir.Model.CatalogEntry.CatalogEntryType>)TypeElement.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.CatalogEntry.CatalogEntryStatus>)StatusElement.DeepCopy();
            }
            if (EffectivePeriod != null)
            {
                dest.EffectivePeriod = (Hl7.Fhir.Model.Period)EffectivePeriod.DeepCopy();
            }
            if (OrderableElement != null)
            {
                dest.OrderableElement = (Hl7.Fhir.Model.FhirBoolean)OrderableElement.DeepCopy();
            }
            if (ReferencedItem != null)
            {
                dest.ReferencedItem = (Hl7.Fhir.Model.ResourceReference)ReferencedItem.DeepCopy();
            }
            if (RelatedEntry != null)
            {
                dest.RelatedEntry = new List <Hl7.Fhir.Model.CatalogEntry.RelatedEntryComponent>(RelatedEntry.DeepCopy());
            }
            if (UpdatedBy != null)
            {
                dest.UpdatedBy = (Hl7.Fhir.Model.ResourceReference)UpdatedBy.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            if (EstimatedDuration != null)
            {
                dest.EstimatedDuration = (Hl7.Fhir.Model.Duration)EstimatedDuration.DeepCopy();
            }
            if (BillingCode != null)
            {
                dest.BillingCode = new List <Hl7.Fhir.Model.CodeableConcept>(BillingCode.DeepCopy());
            }
            if (BillingSummaryElement != null)
            {
                dest.BillingSummaryElement = (Hl7.Fhir.Model.FhirString)BillingSummaryElement.DeepCopy();
            }
            if (ScheduleSummaryElement != null)
            {
                dest.ScheduleSummaryElement = (Hl7.Fhir.Model.FhirString)ScheduleSummaryElement.DeepCopy();
            }
            if (LimitationSummaryElement != null)
            {
                dest.LimitationSummaryElement = (Hl7.Fhir.Model.FhirString)LimitationSummaryElement.DeepCopy();
            }
            if (RegulatorySummaryElement != null)
            {
                dest.RegulatorySummaryElement = (Hl7.Fhir.Model.FhirString)RegulatorySummaryElement.DeepCopy();
            }
            return(dest);
        }
コード例 #10
0
ファイル: Review.cs プロジェクト: Quarterback16/Tycoon.API
 public bool Converted()
 {
     return(UpdatedBy.Equals(DataConstants.ConversionUserId));
 }