コード例 #1
0
ファイル: DvTime.cs プロジェクト: panky2sharma/OpenEHR
        public DvTime()
            : base()
        {
            System.DateTime now = System.DateTime.Now.ToUniversalTime();
            this.isoTime = new Iso8601Time(now.Hour, now.Minute, now.Second, now.Millisecond / 1000,
                                           new Iso8601TimeZone("Z"));

            this.CheckInvariants();
        }
コード例 #2
0
ファイル: DvTime.cs プロジェクト: panky2sharma/OpenEHR
        public DvTime(int hour, int minute, int second, double fractionalSecond,
                      int timeZoneSign, int timeZoneHour, int timeZoneMinute)
        {
            AssumedTypes.Iso8601TimeZone timeZone =
                new OpenEhr.AssumedTypes.Iso8601TimeZone
                    (timeZoneSign, timeZoneHour, timeZoneMinute);

            this.isoTime = new OpenEhr.AssumedTypes.Iso8601Time
                               (hour, minute, second, fractionalSecond, timeZone);

            this.CheckInvariants();
        }
コード例 #3
0
ファイル: DvTime.cs プロジェクト: panky2sharma/OpenEHR
        public DvTime(string timeString, DvDuration accuracy, string magnitudeStatus, CodePhrase normalStatus,
                      DvInterval <DvTime> normalRange, ReferenceRange <DvTime>[] otherReferenceRanges)
            : this()
        {
            Check.Require(Iso8601Time.ValidIso8601Time(timeString), "Time string(" + timeString + ") must be a valid ISO 8601 time.");

            this.isoTime = new Iso8601Time(timeString);

            base.SetBaseData(accuracy, magnitudeStatus, normalStatus, normalRange, otherReferenceRanges);

            CheckInvariants();
        }
コード例 #4
0
ファイル: DvTime.cs プロジェクト: panky2sharma/OpenEHR
        protected override void ReadXmlBase(System.Xml.XmlReader reader)
        {
            base.ReadXmlBase(reader);

            // Get value

            Check.Assert(reader.LocalName == "value", "reader.LocalName must be 'value'");
            string value = reader.ReadElementString("value", RmXmlSerializer.OpenEhrNamespace);

            this.isoTime = new Iso8601Time(value);

            reader.MoveToContent();
        }