コード例 #1
0
        internal FhirJsonNode(JObject root, string nodeName, FhirJsonParsingSettings settings = null)
        {
            JsonObject = root ?? throw Error.ArgumentNull(nameof(root));
            Name       = (nodeName ?? (string.IsNullOrEmpty(ResourceType) ? null : ResourceType))
                         ?? throw Error.InvalidOperation("Root object has no type indication (resourceType) and therefore cannot be used to construct an FhirJsonNode. " +
                                                         $"Alternatively, specify a {nameof(nodeName)} using the parameter.");
            Location = Name;

            JsonValue  = null;
            ArrayIndex = null;
            UsesShadow = false;
            _settings  = settings?.Clone() ?? new FhirJsonParsingSettings();
        }
コード例 #2
0
 /// <summary>Create a new <see cref="ConfigurableNavigatorStreamFactory"/> instance for the specified parser configuration settings.</summary>
 /// <param name="xmlParsingSettings">Configuration settings that control the behavior of the internal XML parser.</param>
 /// <param name="jsonParsingSettings">Configuration settings that control the behavior of the internal JSON parser.</param>
 public ConfigurableNavigatorStreamFactory(FhirXmlParsingSettings xmlParsingSettings, FhirJsonParsingSettings jsonParsingSettings)
 {
     XmlParsingSettings  = xmlParsingSettings?.Clone() ?? FhirXmlParsingSettings.CreateDefault();
     JsonParsingSettings = jsonParsingSettings?.Clone() ?? FhirJsonParsingSettings.CreateDefault();
 }