public void TestStringToDateTimeOffset()
 {
     Assert.AreEqual(new DateTimeOffset(1976, 12, 12, 0, 0, 0, TimeSpan.Zero), PrimitiveTypeConverter.ConvertTo <DateTimeOffset>("1976-12-12"));
 }
        public void TestEnumToString()
        {
            var x = QC.LessOrEqual;

            Assert.AreEqual("<=", PrimitiveTypeConverter.ConvertTo <string>(x));
        }
예제 #3
0
 private DateTimeOffset toDTO()
 {
     return(PrimitiveTypeConverter.ConvertTo <DateTimeOffset>(toDTOParseable(_value)).ToUniversalTime());
 }
예제 #4
0
 public DateTime?ToDateTime()
 => Value == null ? null : (DateTime?)PrimitiveTypeConverter.ConvertTo <DateTime>(Value);
예제 #5
0
 public static string ToFhirDateTime(this System.DateTimeOffset me) => PrimitiveTypeConverter.ConvertTo <string>(me);
예제 #6
0
 public override string ToString()
 {
     return(PrimitiveTypeConverter.ConvertTo <string>(this.ObjectValue));
 }
예제 #7
0
 public override string ToString()
 {
     return(PrimitiveTypeConverter.ConvertTo <string>(Value));//.ConvertTo<string>());
 }
예제 #8
0
 public static PartialDateTime FromDateTime(DateTimeOffset dto)
 {
     return(new PartialDateTime {
         _value = PrimitiveTypeConverter.ConvertTo <string>(dto)
     });
 }
예제 #9
0
 public static Evaluator Today()
 {
     return(Eval.TypedValue(PartialDateTime.Parse(PrimitiveTypeConverter.ConvertTo <string>(DateTime.Today))));
 }
예제 #10
0
        public void TestEnumToString()
        {
            var x = Quantity.QuantityComparator.LessOrEqual;

            Assert.AreEqual("<=", PrimitiveTypeConverter.ConvertTo <string>(x));
        }
예제 #11
0
 public override string ToString() => Value != null?PrimitiveTypeConverter.ConvertTo <string>(Value) : "";
예제 #12
0
 public DateTimeOffset?ToDateTimeOffset() =>
 Value == null ? null : (DateTimeOffset?)PrimitiveTypeConverter.ConvertTo <DateTimeOffset>(Value);
예제 #13
0
 public void TestStringToDateTime()
 {
     Assert.AreEqual(new DateTime(1976, 12, 12), PrimitiveTypeConverter.ConvertTo <DateTime>("1976-12-12"));
 }
예제 #14
0
 public FhirDateTime(DateTimeOffset dt) : this(PrimitiveTypeConverter.ConvertTo <string>(dt))
 {
 }
예제 #15
0
 public static NumberValue Parse(string text)
 {
     return(new NumberValue(PrimitiveTypeConverter.ConvertTo <Decimal>(text)));//.ConvertTo<Decimal>()));
 }
예제 #16
0
 public static FhirDateTime Now()
 {
     return(new FhirDateTime(PrimitiveTypeConverter.ConvertTo <string>(DateTimeOffset.Now)));
 }
예제 #17
0
 private string toStringRepresentation(ITypedElement vp)
 {
     return(vp == null || vp.Value == null ?
            null :
            PrimitiveTypeConverter.ConvertTo <string>(vp.Value));
 }
예제 #18
0
 public DateTimeOffset ToUniversalTime()
 {
     return(PrimitiveTypeConverter.ConvertTo <DateTimeOffset>(_value).ToUniversalTime());
 }
예제 #19
0
 public static PartialTime Now()
 {
     return(new PartialTime {
         _value = PrimitiveTypeConverter.ConvertTo <string>(DateTimeOffset.Now).Substring(10)
     });
 }
예제 #20
0
 public static string ToFhirDateTime(this System.DateTimeOffset?me) => me.HasValue ? PrimitiveTypeConverter.ConvertTo <string>(me) : null;
예제 #21
0
 internal static string Canonical(this object value) => PrimitiveTypeConverter.ConvertTo <string>(value);