Пример #1
0
        /// <summary>
        /// Returns the remainder when this object's value is divided by x.
        /// </summary>
        /// <param name="x">The divisor.</param>
        public FormattedNumber Remainder(FormattedNumber x)
        {
            CanonicalNumber OperationResult = Canonical.Remainder(x.Canonical);

            FormattedNumber Result = FromCanonical(OperationResult);

            return(Result);
        }
Пример #2
0
        /// <summary>
        /// Returns the bitwise XOR of this object's value and x.
        /// </summary>
        /// <param name="x">The number.</param>
        public FormattedNumber BitwiseXor(FormattedNumber x)
        {
            CanonicalNumber OperationResult = Canonical.BitwiseXor(x.Canonical);

            FormattedNumber Result = FromCanonical(OperationResult);

            return(Result);
        }
Пример #3
0
        /// <summary>
        /// Returns the square root of this object's value.
        /// </summary>
        public FormattedNumber Sqrt()
        {
            CanonicalNumber OperationResult = Canonical.Sqrt();

            FormattedNumber Result = FromCanonical(OperationResult);

            return(Result);
        }
Пример #4
0
        /// <summary>
        /// Returns this object's value divided by a specified power of two.
        /// </summary>
        /// <param name="x">The number.</param>
        public FormattedNumber ShiftRight(FormattedNumber x)
        {
            CanonicalNumber OperationResult = Canonical.ShiftRight(x.Canonical);

            FormattedNumber Result = FromCanonical(OperationResult);

            return(Result);
        }
        public static bool HasContainedValueSet(this Questionnaire questionnaire, Canonical canonical)
        {
            EnsureArg.IsNotNull(canonical, nameof(canonical));

            string literal = canonical.Value.IndexOf("#") == 0 ? canonical.Value.Substring(1) : string.Empty;

            return(questionnaire.Contained.Any(r => r.ResourceType(FhirVersion.R4) == ResourceTypeWrapper.ValueSet && r.Id == literal));
        }
Пример #6
0
 public override bool Equals(object obj)
 {
     if (obj is InvalidParameterInfo info)
     {
         //checking canonical name and kind is enough for invalid parameters to be the same
         return(Canonical.Equals(info.Canonical, StringComparison.OrdinalIgnoreCase) && ErrorKind == info.ErrorKind);
     }
     return(base.Equals(obj));
 }
Пример #7
0
        public static CapabilityStatement AddSingleResourceComponent(
            this CapabilityStatement capabilityStatement,
            string resourcetype,
            bool readhistory,
            bool updatecreate,
            CapabilityStatement.ResourceVersionPolicy versioning,
            Canonical profile = null)
        {
            var resource = new CapabilityStatement.ResourceComponent
            {
                Type         = Hacky.GetResourceTypeForResourceName(resourcetype),
                Profile      = profile,
                ReadHistory  = readhistory,
                UpdateCreate = updatecreate,
                Versioning   = versioning
            };

            capabilityStatement.Server().Resource.Add(resource);
            return(capabilityStatement);
        }
Пример #8
0
        public static CapabilityStatement AddSingleResourceComponent(this CapabilityStatement capabilityStatement, String resourcetype, Boolean readhistory, Boolean updatecreate, CapabilityStatement.ResourceVersionPolicy versioning, Canonical profile = null)
        {
            var resource = new CapabilityStatement.ResourceComponent();

            resource.Type         = Hacky.GetResourceTypeForResourceName(resourcetype);
            resource.Profile      = profile;
            resource.ReadHistory  = readhistory;
            resource.UpdateCreate = updatecreate;
            resource.Versioning   = versioning;
            capabilityStatement.Server().Resource.Add(resource);
            return(capabilityStatement);
        }
Пример #9
0
 public bool Equals(InvalidParameterInfo other)
 {
     return(Canonical.Equals(other.Canonical, StringComparison.OrdinalIgnoreCase) && ErrorKind == other.ErrorKind);
 }
Пример #10
0
 public override int GetHashCode()
 {
     return(new { a = Canonical?.ToLowerInvariant(), ErrorKind }.GetHashCode());
 }
Пример #11
0
 private static List <Expression> ToExpressions(Canonical element) =>
 element == null || string.Empty.Equals(element.Value) ? null : ListOf(new StringValue(element.Value));