Example #1
0
        public BigDataPoolParametrizationReference(BigDataPoolReferenceType type, object referenceName)
        {
            if (referenceName == null)
            {
                throw new ArgumentNullException(nameof(referenceName));
            }

            Type          = type;
            ReferenceName = referenceName;
        }
        public BigDataPoolReference(BigDataPoolReferenceType type, string referenceName)
        {
            if (referenceName == null)
            {
                throw new ArgumentNullException(nameof(referenceName));
            }

            Type          = type;
            ReferenceName = referenceName;
        }
        internal static BigDataPoolParametrizationReference DeserializeBigDataPoolParametrizationReference(JsonElement element)
        {
            BigDataPoolReferenceType type = default;
            object referenceName          = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = new BigDataPoolReferenceType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("referenceName"))
                {
                    referenceName = property.Value.GetObject();
                    continue;
                }
            }
            return(new BigDataPoolParametrizationReference(type, referenceName));
        }