Пример #1
0
        internal static PipelineReference DeserializePipelineReference(JsonElement element)
        {
            PipelineReferenceType type      = default;
            string            referenceName = default;
            Optional <string> name          = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = new PipelineReferenceType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("referenceName"))
                {
                    referenceName = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
            }
            return(new PipelineReference(type, referenceName, name.Value));
        }
Пример #2
0
        public PipelineReference(PipelineReferenceType type, string referenceName)
        {
            if (referenceName == null)
            {
                throw new ArgumentNullException(nameof(referenceName));
            }

            Type          = type;
            ReferenceName = referenceName;
        }
Пример #3
0
 internal PipelineReference(PipelineReferenceType type, string referenceName, string name)
 {
     Type          = type;
     ReferenceName = referenceName;
     Name          = name;
 }